View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_2_] Leith Ross[_2_] is offline
external usenet poster
 
Posts: 128
Default Running macro in one workbook that refers to variable in anoth

On Jan 20, 10:34 am, Andyjim
wrote:
I must be missing something, Leith.

I placed in the second workbook module this declaration:
Public usrfile As Workbook (in the same module as UPdate3). However, when I
run the macro from the 1st workbook I get:

Object variable or with block variable not set.

I don't know how to use the SET statement in the second module, because I
don't know the name of the 1st workbook from which I initiated the 1st macro.

I also tried placing that same Public usrfile as workbook in the 1st
workbook, but that didnt seem to help.

Any help would be greatly appreciated.

Thanks

Andy


Hello Andy,

If you like, I can take a look at your workbooks if you can send them
to me. It would make correcting the code easier. My email is
.

Sincerely,
Leith Ross