Good Morning!
I'm trying to make an auto Normal.dotm copy file routine when I open a excel file because sometimes i lost my saved macros. Since the file Normal.dotm has all the macros saved seems to me a good idea to save it from time to time.
The code is the follwing
Code:Private Sub Workbook_open()
Dim a As Integer
a = Range("A1").Value + 1
Range("A1").Value = a
FileCopy "C:\Users\njesus\AppData\Roaming\Microsoft\Templates\Normal.dotm", "C:\Users\njesus\Dropbox\Setcontrol\VBA\Normal" & Range("A1").Value & ".dotm", strDBLocation
End Sub
When the macro runs i'm getting the error:
"Compile error
Wrong number of arguments or invalid property assignment"
maybe because of the Windows folder properties.
Also i don't have Administrator rights because it is my work desktop
Is there a better way to solve it?
Regards