Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey guys how do I store the name of a workbook in a variable so that I can activate it late on in the procedure? The user will save the file according to what he wants and hence I need to use a variable to activate the workbook. thanks for your time jnasr -- jnasr00 ------------------------------------------------------------------------ jnasr00's Profile: http://www.excelforum.com/member.php...o&userid=28515 View this thread: http://www.excelforum.com/showthread...hreadid=502347 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
MyVariable = Activeworkbook.Name
Bob Umlas Excel MVP "jnasr00" wrote in message ... Hey guys how do I store the name of a workbook in a variable so that I can activate it late on in the procedure? The user will save the file according to what he wants and hence I need to use a variable to activate the workbook. thanks for your time jnasr -- jnasr00 ------------------------------------------------------------------------ jnasr00's Profile: http://www.excelforum.com/member.php...o&userid=28515 View this thread: http://www.excelforum.com/showthread...hreadid=502347 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rather than just store the workbook name, store the workbook object
DIm oWB As Workbook Set oWB = ActiveWorkbook or maybe when you open the workbook Set oWB = Workbooks.Open(filename) Then you can re-activate later with oWB.ACtivate or just reference that object direcly With oWB ... End With -- HTH Bob Phillips (remove nothere from email address if mailing direct) "jnasr00" wrote in message ... Hey guys how do I store the name of a workbook in a variable so that I can activate it late on in the procedure? The user will save the file according to what he wants and hence I need to use a variable to activate the workbook. thanks for your time jnasr -- jnasr00 ------------------------------------------------------------------------ jnasr00's Profile: http://www.excelforum.com/member.php...o&userid=28515 View this thread: http://www.excelforum.com/showthread...hreadid=502347 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Storing all macros in one workbook | Excel Programming | |||
storing data | Excel Worksheet Functions | |||
Storing data | New Users to Excel | |||
Storing generic objects in workbook via automation | Excel Programming | |||
Storing appostrophe's in SQL | Excel Programming |