Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Soft-coding document name?
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? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Soft-coding document name?
Windows(format(Date,"mmmm yy") & " Outlook - prelim.xls").Activate
HTH -- AP "Rick Charnes" a écrit dans le message de news: ... 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? |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Soft-coding document name?
Does this mean that the line of code is in the workbook named:
"May 06 Outlook - prelim.xls" If yes, you can use: Thisworkbook.activate Rick Charnes wrote: 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? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Difficult for me, probably basic to you | Excel Worksheet Functions | |||
Word found no merge fields in your main document. | Excel Discussion (Misc queries) | |||
Help: Can't display contents of Adobe Acrobat Document in Sheet | Excel Discussion (Misc queries) | |||
How to embed Word document into Excel and retain sizing, formatti. | Excel Discussion (Misc queries) | |||
Hyperlink to a word document | Excel Discussion (Misc queries) |