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

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

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,136,370
Messages
5,675,367
Members
419,566
Latest member
moni2277

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