Question:
Could anyone tell me how to fix Run-time Error '1004' in excel?
mckenzr72
2007-04-18 20:41:54 UTC
I have quite a large database that contains macros etc. and have had this error message come up each time I try to run the macro.

Run-time Error '1004': Application-defined or object-defined error

Could someone please explain to me how i can fix it?
Three answers:
anonymous
2007-04-19 03:19:06 UTC
This happened when the macro is trying to work with a variable that is not defined

If you are the one who right this macro, the go and add a difinition to each variable

(It happened to me all the times when I use my Excel files on another computers)

If not, I recommand you to get some macro IT guys help to do it for you



Enjoy my profile, I am the VBAXLMan
unnga
2007-04-19 01:51:19 UTC
Probably a bug in the macro.



If you are in Microsoft Visual basic window, click run/reset. Copy the whole code sub .. () end sub. Post the question in Yahoo!Answers.
aldwin
2016-11-26 02:12:58 UTC
a pair of issues. First, the issue isn't plenty with the "format" area of your shop as, yet greater so because of the line before that. you're suited, you're storing "/" in that cellular, so as that only won't artwork as is. What i could propose is replace that code with this: ' ' right now Macro Dim dtmTest, AsDate dtmTest = Date ActiveSheet.variety("A1") = "AutoRec " & Month(Date) & "-" & Day(Date) & " PC23 KY MS l. a. SC NC PR FP" Dim tmp As String tmp = variety("A1").cost & Month(Date) & "-" & Day(Date) ActiveWorkbook.SaveAs Filename:=variety("A1").cost The above code created a record referred to as "AutoRec 7-20 PC23 KY MS l. a. SC NC PR FP.xlsm" i desire this facilitates!


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...