Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

quasar51

macrumors newbie
Original poster
Mar 24, 2021
2
0
A macro made in Excel on a Windows machine isn't working on my mac. Below is the section it's getting hung up on and giving me a syntax error. Trying to figure out what I could do to make this work. I'm guessing it's the filename designation. Frankly, I don't care where it gets saved on my mac, but if someone could help me out with the filename path, that'd probably do the trick.

ActiveWorkbook.SaveAs _
Filename:=C:\Reports\ & "_Daily_Report", _
FileFormat:=xlOpenXMLWorkbook, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
 

TiggrToo

macrumors 601
Aug 24, 2017
4,205
8,838
A macro made in Excel on a Windows machine isn't working on my mac. Below is the section it's getting hung up on and giving me a syntax error. Trying to figure out what I could do to make this work. I'm guessing it's the filename designation. Frankly, I don't care where it gets saved on my mac, but if someone could help me out with the filename path, that'd probably do the trick.

ActiveWorkbook.SaveAs _
Filename:=C:\Reports\ & "_Daily_Report", _
FileFormat:=xlOpenXMLWorkbook, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _

The filename is for windows only. C:\ is a Windows designation. Change it to match your Mac paths using / as a folder name separator, e.g. /Users/JaneDoe/Documents
 
  • Like
Reactions: quasar51

quasar51

macrumors newbie
Original poster
Mar 24, 2021
2
0
Thanks for that tip. I tried doing as you suggested but I'm still getting the syntax error. It's highlighting the first two lines of the section I included in my post. Here's what I put: Filename:=Macintosh HD/Users/XDG/ & "_Daily_Report",_
 

TiggrToo

macrumors 601
Aug 24, 2017
4,205
8,838
Thanks for that tip. I tried doing as you suggested but I'm still getting the syntax error. It's highlighting the first two lines of the section I included in my post. Here's what I put: Filename:=Macintosh HD/Users/XDG/ & "_Daily_Report",_
You probably need some " around the path and start with /Users/... & not Macintosh HD
 

AttilaTheHun

macrumors 65816
Feb 18, 2010
1,229
201
USA
Excel crash on me after upgrade to Catalina 10.15.7 any change in any line in the tablet will change the formula sum stoped working too
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.