if, by another open worksheet, you mean a completely different file, i think
you need to use the WORKBOOKS property (see your excel help): -
Workbooks("BOOK1").ActivateThis example opens the workbook Large.xls.
Workbooks.Open filename:="LARGE.XLS"i'm sure somone will be along shortly to
fill in the rest of the details (and if they do, could they please try to
answer my post earlier today regarding active directory)!
cheers,
tim
"cphenley " wrote in message
...
I am trying to change the date on a newly created worksheet by adding to
a value contained in another open worksheet.
I keep having subscript errors because I don't know how to switch
between worksheets.
Here is an example of code:
Worksheets(BackupFileName).Range("B4").Value =
Worksheets(NewFileName).Range("B4").Value + 1
BackupFileName and NewFileName are both strings, can someone help me
reference them in my code?
Thanks
---
Message posted from http://www.ExcelForum.com/