error 1004: method 'iteration' of object '_application' failed

juliadeclared

New Member
Joined
Apr 24, 2014
Messages
1
Hi,
I've never used macros before, so attempting to debug this thing is like learning a new language. I got the following error when trying to open a document:

1004: method 'iteration' of object '_application' failed

When I attempt to debug, I get this code:

Private Sub Workbook_Open()
Application.Iteration = True
Call BuildBar(ThisWorkbook.Name + " TB")
Call RebootModel
Sheet9.Activate
End Sub
With "Application.Iteration = True" highlighted. I'm not exactly sure what it all means. Only thing i found online about this, says to try this:

With Application​
If Not .Iteration Then .Iteration = True​
End With​

But I have no idea where to put it. I've tried it like so:



Private Sub Workbook_Open()​

Application.Iteration = True​

Call BuildBar(ThisWorkbook.Name + " TB")​
Call RebootModel​

Sheet9.Activate​

With Application​
If Not .Iteration Then .Iteration = True​
End With​

End Sub


But it gives me the following error when I try to run it:

Run-time error '1004':
application-defined or object-defined error

What should I do?! Please help.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the forum, change it like this:

Private Sub Workbook_Open()
With Application
If Not .Iteration Then .Iteration = True
End With
Call BuildBar(ThisWorkbook.Name + " TB")
Call RebootModel
Sheet9.Activate
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top