Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey all,
How can I get the filename of the spreadsheet and store that string in a variable using vba? (just the filename, not the path) Essentially, I'd like to be able to print out the filename of the spreadsheet without having to hardcode the name. Sort of like in bash, how you can refer to $0. Thanks, Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim fileName As String
fileName = ActiveWorkbook.Name Mike Hanby said the following on 03/17/2005 16:15: Hey all, How can I get the filename of the spreadsheet and store that string in a variable using vba? (just the filename, not the path) Essentially, I'd like to be able to print out the filename of the spreadsheet without having to hardcode the name. Sort of like in bash, how you can refer to $0. Thanks, Mike |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Worksheets("Sheet1").Parent.Name On Thu, 17 Mar 2005 16:15:51 -0600, Mike Hanby wrote: Hey all, How can I get the filename of the spreadsheet and store that string in a variable using vba? (just the filename, not the path) Essentially, I'd like to be able to print out the filename of the spreadsheet without having to hardcode the name. Sort of like in bash, how you can refer to $0. Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieving data from Excel and store it into string variable | Excel Programming | |||
Retrieving data from Excel and store it into string variable | Excel Programming | |||
Retrieving data from Excel and store it into string variable | Excel Programming | |||
Retrieving data from Excel and store it into string variable | Excel Programming | |||
Store variable value for Chart | Excel Programming |