Thread
:
how can i get a macro in personal.xls to know my current workbook?
View Single Post
#
2
Posted to microsoft.public.excel.programming
ImpulseBlue
external usenet poster
Posts: 19
how can i get a macro in personal.xls to know my current workbook?
ActiveWorkbook.Sheets(1)
wrote:
Set ws1 = ThisWorkbook.Sheets(1)
Instead of ThisWorkbook, how can I get a macro I have stored in
personal.xls to use the currently active workbook? It is currently
referring only to personal.xls, which needless to say is hidden and
unused. I cannot hard-code a workbook name because every day there is
a new set of workbooks generated from a database, and the names are
always different/dynamic. I need to be able to just open a newly
generated workbook, run my macro, and exit excel as soon as the magic
stops.
Thanks a ton.
Reply With Quote
ImpulseBlue
View Public Profile
Find all posts by ImpulseBlue