Posted to microsoft.public.excel.programming
|
|
VBA to read spreadsheet's filename?
Jon,
Try something like
Dim S As String
S = ActiveWorkbook.Name
' or
S = ThisWorkbook.Name
Use FullName instead of Name if you want the full name (drive, folder, and
file) of the file.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com
"Jon" wrote in message
om...
Hi,
I'm a novice at Excel VBA and looking for a way to retrieve the
filename (e.g. asdfasdf.xls) of the current spreadsheet. Is there a
way to do this?
Thanks
Jon
|