I'm hoping someone can help me modify this code
When the code is run it makes a copy and removes the VBA.
What I want it to do is only remove the VBA (shapes) in the range of C2:U145
Could somebody help please?
Regards
Kelly
--------------------------------------------------------------------------------------------------------------------------------------------------------
Sub SaveReport()
Dim fname As String
Dim rng1 As Range
Dim rng2 As Range
Sheets("CSF 323 2").Copy
ActiveWindow.Activate
Application.CutCopyMode = False
With ActiveWorkbook
Set rng1 = Sheets("CSF 323 2").UsedRange
rng1 = rng1.Value
On Error Resume Next
For Each s In ActiveSheet.Shapes
s.Select
s.Delete
Next s
End With
fname = InputBox("Please enter a file name that will associate this to the case e.g. PWC or NRP name. You will then be prompted for a 'Save As' location, save to a location of you choice, and then send to Specialist Trace.")
Application.Dialogs(xlDialogSaveAs).Show fname
ActiveWorkbook.Close
End Sub
--------------------------------------------------------------------------------------------------------------------------------------------------------
When the code is run it makes a copy and removes the VBA.
What I want it to do is only remove the VBA (shapes) in the range of C2:U145
Could somebody help please?
Regards
Kelly
--------------------------------------------------------------------------------------------------------------------------------------------------------
Sub SaveReport()
Dim fname As String
Dim rng1 As Range
Dim rng2 As Range
Sheets("CSF 323 2").Copy
ActiveWindow.Activate
Application.CutCopyMode = False
With ActiveWorkbook
Set rng1 = Sheets("CSF 323 2").UsedRange
rng1 = rng1.Value
On Error Resume Next
For Each s In ActiveSheet.Shapes
s.Select
s.Delete
Next s
End With
fname = InputBox("Please enter a file name that will associate this to the case e.g. PWC or NRP name. You will then be prompted for a 'Save As' location, save to a location of you choice, and then send to Specialist Trace.")
Application.Dialogs(xlDialogSaveAs).Show fname
ActiveWorkbook.Close
End Sub
--------------------------------------------------------------------------------------------------------------------------------------------------------