rodrigominatto
New Member
- Joined
- Jul 26, 2021
- Messages
- 2
- Office Version
- 2019
- Platform
- Windows
Hello,
i'm having throubles with my VBA code, in the folder location.
this sheet is in a google drive folder, and 3 people uses it, how can i create a macro for saving in PDF a selected area and save in the correct folder, becouse how its a google drive, in my computer the way to the folder its diferente from the others,
Can someone help me?
Sub pdf()
'
' pdf Macro
'
Dim Nome As String
Sheets("Email").Select
Nome = ThisWorkbook.Path & Cells(2, 10).Value & " " & Cells(2, 11).Value & " - " & Cells(3, 10).Value & " à " & Cells(3, 11).Value & ".pdf"
Sheets("P.S. AÇO 015-20").Select
Range("A4:H48").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Nome, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
thx
i'm having throubles with my VBA code, in the folder location.
this sheet is in a google drive folder, and 3 people uses it, how can i create a macro for saving in PDF a selected area and save in the correct folder, becouse how its a google drive, in my computer the way to the folder its diferente from the others,
Can someone help me?
Sub pdf()
'
' pdf Macro
'
Dim Nome As String
Sheets("Email").Select
Nome = ThisWorkbook.Path & Cells(2, 10).Value & " " & Cells(2, 11).Value & " - " & Cells(3, 10).Value & " à " & Cells(3, 11).Value & ".pdf"
Sheets("P.S. AÇO 015-20").Select
Range("A4:H48").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=Nome, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub
thx