none
My Macro Works on Windows But Wont Work on Mac RRS feed

  • Question

  • Here is the code that i have made.

    Sub Button1_Click()
    mydate = Date
    erw = Sheet3.Cells(1, 1).CurrentRegion.Rows.Count + 1
        Sheet3.Cells(erw, 1) = Range("E3")
        Sheet3.Cells(erw, 2) = Range("B8")
        Sheet3.Cells(erw, 3) = Range("E23")
        Sheet3.Cells(erw, 4) = Range("E24")
        Sheet3.Cells(erw, 5) = Range("E25")
        Sheet3.Cells(erw, 6) = mydate
        Sheet1.Range("B16:D22").ClearContents
        ActiveWorkbook.Save
        
    
    
    
    Dim Cust As String
    Cust = Sheet1.Range("E5")
    
    ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:="G:\Team Drives\Business And Personal Files\Folkins Constuction\Invoices\Invoices 2018\PDF\" & Range("E3") & " - " & Range("E5"), IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenafterPublish:=False
    
    
    Application.DisplayAlerts = False
    ActiveSheet.SaveAs Filename:="G:\Team Drives\Business And Personal Files\Folkins Constuction\Invoices\Invoices 2018\Exel File\" & Range("E3") & " - " & Range("E5"), FileFormat:=xlOpenXMLWorkbook
    Application.DisplayAlerts = True
    
    Range("B16:D22").ClearContents
    ActiveWorkbook.Save
    
    End Sub

    I made this code for my moms invoicing but i made it on my Pc and she has a mac so i need to know how to convert this code to work on a mac 

    Thanks In Advanced

    Thursday, January 25, 2018 8:41 PM

All replies

  • Mac VBA is buggy - Ron deBruin has a page that offers code to export a pdf from a Mac, so give it a try:

    https://www.rondebruin.nl/mac/mac005.htm

    Thursday, January 25, 2018 9:46 PM