View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal Robert Crandal is offline
external usenet poster
 
Posts: 309
Default VBA worksheet references

VBA doesn't seem to like when I use the following code:

Workbooks("mybook").Sheet1.Range("A1").Value = 100

However, the code seems to work when I remove the part that says:

Workbooks("mybook").

How can I fix this reference so that I am able to use my VBA "Sheet1"
reference and specify the workbook at the same time?

thank u