SaveAs Code
What is the correct code to save the current workbook (Book1.xls) as
(Book1A.xls) Thanks for the help. |
SaveAs Code
Hi Ronbo,
Try this: ' Get the filename with path sName = ThisWorkbook.FullName ' Add an 'A' to the end of the filename sName = Left(sName, Len(sName) - 4) & "A.xls" 'Save under new name ThisWorkbook.SaveAs sName Hoop This Helps, Executor |
SaveAs Code
Thanks. Exactly what I was looking for.
"Executor" wrote: Hi Ronbo, Try this: ' Get the filename with path sName = ThisWorkbook.FullName ' Add an 'A' to the end of the filename sName = Left(sName, Len(sName) - 4) & "A.xls" 'Save under new name ThisWorkbook.SaveAs sName Hoop This Helps, Executor |
All times are GMT +1. The time now is 10:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com