Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default how can i get a macro in personal.xls to know my current workbook?

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Personal Macro Workbook Vision2279 Excel Worksheet Functions 1 November 22nd 06 03:40 PM
No Personal Macro Workbook? Kou Vang[_2_] Excel Programming 2 February 3rd 06 05:05 PM
Personal macro workbook and personal.xls John Kilkenny Excel Discussion (Misc queries) 1 June 14th 05 09:43 PM
Personal Macro Workbook Ben Excel Programming 1 December 9th 04 04:13 PM


All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"