Minato5972
New Member
- Joined
- Mar 18, 2021
- Messages
- 11
- Office Version
- 2019
- 2016
Sub Saving(ws As Worksheet)
Dim dt As String
Dim wbNam As String
Dim sFileSaveName As Variant
wbNam = "Salesforecast_"
dt = Format(CStr(Now), "dd_mm_yyy_hh_mm_ss")
sFileSaveName = Application.GetSaveAsFilename(InitialFileName:=wbNam & dt, fileFilter:="Excel Files (*.xlsm), *.xlsm")
If sFileSaveName <> False Then
ActiveWorkbook.SaveAs sFileSaveName
End If
End Sub
Above code is doing the job but i want only one particular sheet named "Forecast" from it, but it is saving all the sheets present in my current workbook
Dim dt As String
Dim wbNam As String
Dim sFileSaveName As Variant
wbNam = "Salesforecast_"
dt = Format(CStr(Now), "dd_mm_yyy_hh_mm_ss")
sFileSaveName = Application.GetSaveAsFilename(InitialFileName:=wbNam & dt, fileFilter:="Excel Files (*.xlsm), *.xlsm")
If sFileSaveName <> False Then
ActiveWorkbook.SaveAs sFileSaveName
End If
End Sub
Above code is doing the job but i want only one particular sheet named "Forecast" from it, but it is saving all the sheets present in my current workbook