Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filenames and changing from 1 wrbk to another

Status
Not open for further replies.

Zebadiah

Technical User
Apr 29, 2001
22
0
0
US
I'm writing a macro that will let me export data from one file into a template file, but the source file name will change each time.

How do I pass the workbook filename to a variable so that I can call the variable in workbook.select?

 
Try something lik ethe following :

Dim strWBName As Srting
strWBName = ThisWorkbook.Name,

or if you want the full path,
strWBName = ThisWorkbook.FullName

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top