I have a workbook with several worksheets. The sheet I want to save has data and/or cell formatting across the range A1 to LP46.
I'm using this VBA code from a button within the worksheet to save the same worksheet:
When I check it, the saved file only contains columns A to IV!
Is there some limitation in Excel that causes the selection to be truncated like this?
I see that it does save all the empty rows below Row 46. So I'm wondering if there's an alternative version I should use that just saves the range A1:LP46 to a new file? If so, can someone please help with the code needed?
Thanks
I'm using this VBA code from a button within the worksheet to save the same worksheet:
Code:
' Copy just the current sheet
ActiveSheet.Select
ActiveSheet.Copy
' Save the new file
' Create variable for file name
Dim SavedFileName As String
SavedFileName = Range("B2").Value & " - Consolidated RMA " & Range("R2").Value & "++ " & " GTI.xls"
' Save it
ActiveSheet.SaveAs "C:\SERVICES\" & SavedFileName, FileFormat:=56
' Close the newly created file
ActiveWorkbook.Close False
' Return user to ConsGTISheet
Windows("WorkshopInput.xlsm").Activate
Sheets("Consolidated GTI").Select
MsgBox ("Worksheet saved :" & SavedFileName & vbCrLf & "")
When I check it, the saved file only contains columns A to IV!
Is there some limitation in Excel that causes the selection to be truncated like this?
I see that it does save all the empty rows below Row 46. So I'm wondering if there's an alternative version I should use that just saves the range A1:LP46 to a new file? If so, can someone please help with the code needed?
Thanks