Automation error?
You didn't post enough code to help us diagnose your problem.
ps- You tell Excel to chose the default option on a dialog box by
using "Application.DisplayAlerts = False" as you have done elsewhere
in your code.
HTH,
JP
On Nov 5, 8:24 pm, R Kumana wrote:
Hello,
I have an error that comes up at the end of this macro. It says "Run-time
error '-2147221080 (800401a8)': Automation error"
This happens after the workbook "OldScorecard" is closed (see code) and the
worksheet "Updater" is deleted.
I suspect it may have to do with the fact that the code is located on the
Updater worksheet. This is intentional. I want to macro to delete itself (and
the sheet it runs from) once it is run once. I tried it before and had no
issues, so I am not completely sure that this is causing it, but it is
certainly happening after the deletion.
I am also getting a message saying there is a lot of information on the
clipboard (presumably when I close the other workbook). How can I force "No"
on this message?
Thanks for helping!
'================================================= ==============
'Cleanup section
'---------------
'Close old scorecard without saving changes
OldScorecard.Close savechanges:=False
'if we put this sheet on the new scorecard.
'This turns off alerts then deletes the updater sheet
Application.DisplayAlerts = False
NewScorecard.Worksheets("Updater").Delete
Application.DisplayAlerts = True
Exit Sub
'================================================= ==============
'Error handling and message section
|