Maybe the nicest way to do this is to:
1. Create the table in Excel
2. With both Excel and Word open, highlight the cells in Excel (at least 20 rows, even if they're blank) and hit CTRL + C.
3. Switch to Word on your taskbar
4. Position the cursor in Word where you want your table to appear and...
I'm wondering...
with one of your completed forms:
1. start recording a macro
2. CTRL + A to select all
3. CTRL + C to copy to the clippy
4. click the NEW icon
5. CTRL + V to paste
6. CTRL + P to print
7. close 'new' document
8. stop recording macro.
Run macro for every completed form. Would...
Try an update query... I created a small database with five records in one column and an empty column waiting for the converted output. ImportData was the column with the data and ConvertData was the empty 'receptacle'. On the Query tab I designed a new query, added my table, clicked on both...
A little further play testing shows that the above code has a minor flaw in the MINUS routine. Seems to be OK as long as TextBox1 is larger than TextBox2, but not the other way around. Somebody can make troubleshooting that their homework assignment.
Here is an idea which will simplify the programming end. It's not fancy but it seems to work.
Create UserForm1
Add three TextBoxes, four OptionButtons and a CommandButton with the caption "CRUNCH".
TextBox1 and TextBox2 accept values in the format "feet [space] inches"...
Perhaps you could use the Shell command in VBA to trigger a DOS batch file. Pass the batch file the filename as an argument. If it already exists, DOS will be sure to paste over it with abandon... DOS is kinda unforgiving that way.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.