Dec 17, 2001 #1 Zebadiah Technical User Apr 29, 2001 22 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?
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?
Dec 17, 2001 #2 acron MIS Oct 19, 2001 476 IE Try something lik ethe following : Dim strWBName As Srting strWBName = ThisWorkbook.Name, or if you want the full path, strWBName = ThisWorkbook.FullName regards Upvote 0 Downvote
Try something lik ethe following : Dim strWBName As Srting strWBName = ThisWorkbook.Name, or if you want the full path, strWBName = ThisWorkbook.FullName regards