Dear all,
it's the first time i'm using a macro in excel and i don't know VBA very well, yet. I need to save all files in some different folders from .dta to .xlxs. I opened the first file and create a new macro in the folder 'PERSONAL.xlsb' and tried with this program:
Sub m()
Dim sFileName As Str
sFileName = Dir(ActiveWorkbook.Path & "*.dta*")
Do While (Len(sFileName) > 0)
ActiveWorkbooks.SaveAs sFileName, xlsx
ActiveWorkboos.Close
sFileName = Dir
Loop
End Sub
But I visualize an error message that I try to translate in english:"compilation error user-defined type not defined".
After reading some posts, I checked 'Microsoft Visual Basic for Applications.....' in References, from Tools Menu but I'm having the same error.
Could you please help me to solve this issue?
Thanks,
Irene
it's the first time i'm using a macro in excel and i don't know VBA very well, yet. I need to save all files in some different folders from .dta to .xlxs. I opened the first file and create a new macro in the folder 'PERSONAL.xlsb' and tried with this program:
Sub m()
Dim sFileName As Str
sFileName = Dir(ActiveWorkbook.Path & "*.dta*")
Do While (Len(sFileName) > 0)
ActiveWorkbooks.SaveAs sFileName, xlsx
ActiveWorkboos.Close
sFileName = Dir
Loop
End Sub
But I visualize an error message that I try to translate in english:"compilation error user-defined type not defined".
After reading some posts, I checked 'Microsoft Visual Basic for Applications.....' in References, from Tools Menu but I'm having the same error.
Could you please help me to solve this issue?
Thanks,
Irene