run-time error 1004 exiting Excel 2007

M

Mark 1018

Every time I exit Excel 2007, I get this error: "Run-time error '1004':
Application-defined or object-defined error"

I have no idea what causes it. I do not use VB but have a few macros I made
using "Record Macro" feature.

It does not seem to cause any problems other than it's pain. How do I get
rid of this?
 
S

Shane Devenshire

Hi,

This is a relatively non-specific error message. It is generate in VBA.
When you get it try click Debug and see if you can find the problem. You can
show us the code that caused the problem and we should be able to help. You
can also go to the Visual Basic Editor manually by press Alt+F11, then open
any module folders and double-click the modules in them. Most likely the
code is in the thisWorkbook object which you will find listed in the Projects
window, top left side under your file.
Double-click it to open it. It sounds like there may be a
Workbook_BeforeClose macros.
 
Joined
Mar 25, 2009
Messages
1
Reaction score
0
Not the answer

I think there is more to this. The same thing suddenly started happening to my computer (Win 2K, Office 07). It doesn't do anything except hang the exit, but it is annoying. I have no macros or VB code installed (at least, that I wrote). Here is a rundown of the contents of the VB Project window:
Contents of MS VB Project Lookup window:

atpvbaen.xls (ATPVBAEN.XLAM) -- clicking on it asks for PW, which I don't have.

Internet_Assistand (HTM.XLAM) -- clicking on it asks for PW, which I don't have.

lookup (LOOKUP.XLAM) -- clicking on it asks for PW, which I don't have.

sumif (SUMIF.XLAM) -- clicking on it asks for PW, which I don't have.

VBAProject (Book1)

-- Microsoft Excel Objects

-- Sheet1 (Sheet1) - nothing in it

-- ThisWorkbook - nothing in it

VBAProject (FUNCRES.XLAM)

-- Microsoft Excel Objects

-- Sheet1 (RES) - nothing in it

-- ThisWorkbook - nothing in it

-- Modules

-- RibbonX_Code (this code was not programmed or installed by me)

'Entry point for RibbonX button click

Sub ShowATPDialog(control As IRibbonControl)

Application.Run ("fDialog")

End Sub

'Callback for RibbonX button label

Sub GetATPLabel(control As IRibbonControl, ByRef label)

label = ThisWorkbook.Sheets("RES").Range("A10").Value

End Sub

and that's all that's there...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top