View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Soft-coding document name?

Surely, if that code is in the workbook, when you open it it will already
be active, so the code is unnecessary?

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Rick Charnes" wrote in message
om...
We have the following line in an Excel macro

Windows("May 06 Outlook - prelim.xls").Activate

I believe the macro is attached to the document "May 06 Outlook -
prelim.xls". Next month this doc will be modified and renamed to "June
07 - prelim.xls". Is there a way to soft-code the document name (into a
variable?) here so that every time this macro is run the variable
expands to the doc name?