smrobi
03-29-2011, 12:55 AM
:(
I have found a peculiar problem. When I am using my macro directly it is working well but when I am saving it as add-ins and using the add-in later to run my micro from, I am getting the error "Object variable or with block variable is not set". I am getting the error in my code section where I wrote "ChDir "C:\"
ActiveWorkbook.SaveAs Filename:= _
"C:\HuaweiBSCAudit.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False"
Please help.
I have found a peculiar problem. When I am using my macro directly it is working well but when I am saving it as add-ins and using the add-in later to run my micro from, I am getting the error "Object variable or with block variable is not set". I am getting the error in my code section where I wrote "ChDir "C:\"
ActiveWorkbook.SaveAs Filename:= _
"C:\HuaweiBSCAudit.xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False"
Please help.