New to Apple

Joined
Aug 14, 2017
Messages
1
Reaction score
0
Points
1
Greetings to All,
I have been a PC user for many years but recently purchased a MacBook Pro. Windows 365 was installed to make use of Excel using VBA.

Developer and macros are enabled.

After much effort I am unable to run the seemingly simple ensuing macro. The document that I am trying to save has an extension of xlsx.

Any help will be greatly appreciated.
Trey

Sub MultipleLocations()
Dim OriginalName As String
OriginalName = ActiveDocument.FullName
ActiveDocument.SaveAs “ExtDr/Officetips/“ + ActiveDocument.Name
ActiveDocument.SaveAs “Users/Me/Documents/Officetest/“ + ActiveDocument.FullName
ActiveDocument.SaveAsOriginalName
End Sub
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,775
Reaction score
2,118
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
You mean "Office 365". OK, and what happens when that macro is run?
 
M

MacInWin

Guest
I'm not an expert, but the file names don't look right. For example, these two lines:
ActiveDocument.SaveAs “ExtDr/Officetips/“ + ActiveDocument.Name
ActiveDocument.SaveAs “Users/Me/Documents/Officetest/“ + ActiveDocument.FullName
don't have path names that work. Neither has a full path name for where to put the document. And the "Users/Me" is only accurate if there is an account named "Me" and you have access to that account. But, as Ashwin has asked, what errors are you getting?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top