Excel on Mac

Posts
1
Registration date
Saturday April 6, 2019
Status
Member
Last seen
April 6, 2019
- - Latest reply: ac3mark
Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
- Apr 6, 2019 at 09:23 AM
Im trying to setup my friends computer to invoice

I have run time 1004 error occurring.

Any help please



Sub NextInvoice()
Range("I13").Value = Range("I13") + 1
Range("B12:E15").ClearContents
Range("B17:E18").ClearContents
Range("B23:G37").ClearContents
End Sub

Sub SaveInvoiceAsPDF()

'Copy Invoice to a new file
NewFN = "Macintosh HD/Users/ambermclean/Documents/DANCE/Dance Teaching Invoices/inv" & Range("i13").Value & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=NewFN, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False
NextInvoice

End Sub
See more 

1 reply

Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1571
0
Thank you
Prior to selecting the range, select the sheet. The program doesn't know what sheet to get the range from.
Respond to ac3mark