Hi I wrote the code (Got a fair bit of help off forums) for some macros on OS only to find they don't work on Mac. Did some digging I think I'm right in saying Mac uses a different version of VBA. Anyways I'm aware I'll have to rewrite the code for Mac but really struggling to find any help online. Here is the code for OS anyone got any advice on where to start?
>>> use code - tags <<<
TIA
>>> use code - tags <<<
Code:
Sub BRRRSnapshot()
Dim wsA As Worksheet
Dim wbA As Workbook
Dim strTime As String
Dim strName As String
Dim strPath As String
Dim strFile As String
Dim strPathFile As String
Dim myFile As Variant
On Error GoTo errHandler
Set wbA = ActiveWorkbook
Set wsA = ActiveSheet
strTime = Format(Now(), "yyyymmdd\_hhmm")
Sheets("Sheet1").Select
Range("A1:X40").Select
strFile = strName & "_" & strTime & ".pdf"
strPathFile = strPath & strFile
myFile = Application.GetSaveAsFilename _
(InitialFileName:=strPathFile, _
FileFilter:="PDF Files (*.pdf), *.pdf", _
Title:="Save SnapShot To")
If myFile <> "False" Then
Selection.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:=myFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
MsgBox "BRRR Snapshot saved to PDF:" _
& vbCrLf _
& myFile
End If
Sheets("Master").Select
exitHandler:
Exit Sub
errHandler:
MsgBox "Could not create PDF file"
Resume exitHandler
TIA
Last edited by a moderator: