View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Andyjim Andyjim is offline
external usenet poster
 
Posts: 70
Default Running macro in one workbook that refers to variable in anoth


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