mummbles74
Board Regular
- Joined
- Nov 14, 2009
- Messages
- 125
- Office Version
- 365
- Platform
- Windows
I have this code that saves a file as a PDF in the folder location that the excel document is saved in based on certain cell values.
Is there a way to make this work for Windows and MAC?
Sub GenerateLoopDrgs()
Dim Row As Long
Row = 4
With Worksheets("Review Data")
Do Until IsEmpty(.Cells(Row, "G").Value)
Worksheets(.Cells(Row, "G").Value).Range("BX1") = .Cells(Row, "A").Value
Worksheets(.Cells(Row, "G").Value).ExportAsFixedFormat Type:=xlTypePDF, Filename:=ThisWorkbook.Path & "\" & .Cells(Row, "B") & "-" & .Cells(Row, "C") & "-" & .Cells(Row, "D") & "-" & .Cells(Row, "A") & "-" & Worksheets(.Cells(Row, "G").Value).Range("BX4").Value
Row = Row + 1
Loop
End With
MsgBox "Drawings have been generated.", vbOKOnly, "Cenelec Standards Inspections LTD"
End Sub
Is there a way to make this work for Windows and MAC?
Sub GenerateLoopDrgs()
Dim Row As Long
Row = 4
With Worksheets("Review Data")
Do Until IsEmpty(.Cells(Row, "G").Value)
Worksheets(.Cells(Row, "G").Value).Range("BX1") = .Cells(Row, "A").Value
Worksheets(.Cells(Row, "G").Value).ExportAsFixedFormat Type:=xlTypePDF, Filename:=ThisWorkbook.Path & "\" & .Cells(Row, "B") & "-" & .Cells(Row, "C") & "-" & .Cells(Row, "D") & "-" & .Cells(Row, "A") & "-" & Worksheets(.Cells(Row, "G").Value).Range("BX4").Value
Row = Row + 1
Loop
End With
MsgBox "Drawings have been generated.", vbOKOnly, "Cenelec Standards Inspections LTD"
End Sub