opening excel from word document...

cmchenry

New Member
Joined
Jan 21, 2005
Messages
1
Hi. I have created a word merge document that takes some values (using vba) entered by users and opens up an excel spreadsheet and copies those values to the worksheet and saves it. The problem is that sometimes more than one user will be doing this and only one worksheet can be opened up at a time. If someone runs the letter and it opens up the excel spreadsheet when it is open at someone's computer already, is there some code I can use (i.e., an error code or something) that I can use in a loop so that the program will recognize that the spreadsheet is already open and loop through some numbers (i.e, so that will wait for a couple of seconds) and then test again to see if the spreadsheet can be opened...
I know exactly how I would do it, but I just need to error code (or something like that) that can be identified by the vba in word so that it can recognize that the excel spreadsheet is opened by someone else. Any help you can provide would be much appreciated!!
Thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,214,788
Messages
6,121,597
Members
449,038
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top