Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Norman
It works. Thanks! regards, Hans -----Original Message----- Hi Hans, Try this adaptation: Sub SaveAsReporting() Dim stOldName As String Dim stNewName As String Dim stPartName As String stOldName = ThisWorkbook.FullName stPartName = Left(stOldName, Len(stOldName) - 4) stNewName = stPartName & " For Reporting.xls" ActiveWorkbook.SaveAs stNewName End Sub --- Regards, Norman "Hans" wrote in message ... I have the following macro for saving a file under the existing name with "For Reporting" added to it: Sub SaveAsReporting() Dim stOldName As String Dim stNewName As String stOldName = ThisWorkbook.FullName stNewName = stOldName & " For Reporting" ActiveWorkbook.SaveAs stNewName End Sub However, the new name also includes the extension ".xls" ("filename.xls For Reporting") and I don't like that. Is there a simple way to save the file without the ".xls"? Hans . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting LF Characters in cells | Excel Worksheet Functions | |||
Deleting Characters | Excel Discussion (Misc queries) | |||
Deleting rows with 11+ characters. | Excel Discussion (Misc queries) | |||
Deleting characters that are not numbers | Excel Discussion (Misc queries) | |||
Deleting 3 Text characters from the right | Excel Worksheet Functions |