asyamonique
Well-known Member
- Joined
- Jan 29, 2008
- Messages
- 1,280
- Office Version
- 2013
- Platform
- Windows
Good Day,
Below code is creating the PDF file and named with worksheet name.
My question is how can we change it, instead of worksheet name to create as cell text or value?
Many Thanks
Below code is creating the PDF file and named with worksheet name.
My question is how can we change it, instead of worksheet name to create as cell text or value?
Many Thanks
VBA Code:
Sub Button1_Click()
Dim wsA As Worksheet
Dim strFile, myfile As String
On Error Resume Next
wsA.Activate
strFile = "\\172.16.23.181\folder\xxxxx\xxxxx\"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
strFile & "" & ActiveSheet.Name, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub