how can i get a macro in personal.xls to know my current workbook?

N

nebuul

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.
 
N

nebuul

Awesome, thanks!

I'm an excel noob, but I don't use it enough to need to learn VBA :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top