Hey All -I am hoping someone can help me
I am a novice (self taught/learning) so i have been grabing code from all over to build my Macro
Below is part of the macro -it prompts the user to select the file the macro will use to update our master price workbook
I then want to save the file elsewhere so the original file isn't modified.
I keep getting a Runtime Error 1004 -Excel cannot access the file
I can't work out why?
I know it will be my lack of formal knowledge causing the issue.
If someone can help -please explain as if i am a 2 year old not 46 lol
thanks
Dean
MsgBox "Please Select MicroJets New Price Book"
fName = Application.GetOpenFilename(FileFilter:="Excel Files (*.XLSX), *.XLSX", Title:="Select File To Be Opened")
If fName = False Then Exit Sub
'Set bk1 = Workbooks.Open(fName)
savefilename = Mid(fName, InStrRev(fName, "\") + 1)
MsgBox savefilename
Set bk1 = Workbooks.Open(savefilename)
bk1.SaveCopyAs filename:= _
"C:\Users\Public\Public Documents\Work-Macros\" & savefilename ', FileFormat:=51, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
Bookmarks