hi all - my macro works well and saves the entire workbook, but i need it to save only either the active sheet or sheet named PCR Form. how can i modify the code below? i tried changing to ActiveSheet but it still saved the whole book.
TIA
Code:
Option Explicit
Sub SaveFile()
Dim savepath As String
Dim Fname As String
Fname = Worksheets("Lists").Cells(1, 10).Value
savepath = "\\mdzausutwfnp001\Shardata\Change Management\Plant Change Requests\Submitted PCRs\"
savepath = savepath & Fname & "\"
If Dir(savepath, vbDirectory) = "" Then
MkDir savepath
End If
Fname = Fname & " " & Format(Now(), "dd.mmm.yy hhmm AMPM") & ".xlsm"
ActiveWorkbook.SaveAs savepath & "\" & Fname
'removes upload button after the first time the PCR is submitted and saved
ActiveSheet.Shapes("Picture 36").Visible = False
ActiveSheet.Shapes("TextBox 37").Visible = False
'shows save icon after first upload to register
ActiveSheet.Shapes("Picture 43").Visible = True
ActiveSheet.Shapes("TextBox 49").Visible = True
TIA