Starting up Excel remotely... VBA does nothing!

vesc

Board Regular
Joined
Mar 17, 2006
Messages
83
Hi, I've managed to create a system by which I can start-up a new session of Excel and have it open a file. When the file is loaded I execute a macro in that file. Thanks to member of this site who gave me most of the code required to do this! I have several of these that I "invoke" from a "central / control" workbook. They all work fine except one. The one that doesn't work contains:

...
debug.assert False

Range("A1").Select
...

The debug statement breaks me into the code after the remote invocation. However the Range selection statement does nothing. After this statement there is a sequence that should be copying and pasting some info... none of it executes. The debugger happily shows each statement as being executed, but nothing happens.

If I open this file manually and execute the macro... it works properly!!!

Any ideas??

Thanks in advance,

Vesc
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

vesc

Board Regular
Joined
Mar 17, 2006
Messages
83
Solved

Ah, missed a DoEvents call, which ends up changing the active workbook!

Apologies for the inconvenience.

-Vesc
 

Forum statistics

Threads
1,171,178
Messages
5,874,185
Members
433,033
Latest member
thatmacroguy

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
Top