HI ,
any help would be most welcome
I have the following code which I link to a button that automatically saves a certain section of a worksheet. how can I modify the code to save a PDF rather than worksheet xls
Sub SaveShts()
Dim Ws As Worksheet, i As Integer
Application.ScreenUpdating = False
i = 0
For Each Ws In Worksheets
If Ws.Visible Then
i = i + 1
If i > 2 Then Exit For
Ws.Copy
ActiveWorkbook.SaveAs "C:\Users\User\Desktop\Invoice work" & Ws.Range("K1").Text, 51
ActiveWorkbook.Close
End If
Next Ws
End Sub
Kind regards
Darren
any help would be most welcome
I have the following code which I link to a button that automatically saves a certain section of a worksheet. how can I modify the code to save a PDF rather than worksheet xls
Sub SaveShts()
Dim Ws As Worksheet, i As Integer
Application.ScreenUpdating = False
i = 0
For Each Ws In Worksheets
If Ws.Visible Then
i = i + 1
If i > 2 Then Exit For
Ws.Copy
ActiveWorkbook.SaveAs "C:\Users\User\Desktop\Invoice work" & Ws.Range("K1").Text, 51
ActiveWorkbook.Close
End If
Next Ws
End Sub
Kind regards
Darren