Runtime error 424 Object Required

GJennin7

New Member
Joined
Oct 7, 2020
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hi Guy's, I am getting a run time error on the below two highlighted code lines. I do not have enough experience to understand what the problem is so would be extremely grateful for some assistance.


Rich (BB code):
Sub UpdateProgress(pct)
    With ProgressIndicator
        .FrameProgress.Caption = Format(pct, "0%")
        .LabelProgress.Width = pct * (.FrameProgress.Width - 10)
    End With
'   The DoEvents statement is responsible for the form updating
    DoEvents
End Sub
 
Last edited by a moderator:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
It looks like the ProgressIndicator is a user form that you are using to display the progress.

The error says that it cannot find an object called as "ProgressIndicator". So, you need to check this user form's name and make sure it is ProgressIndicator.

Unlikely, but possible, if it is not a user form but a custom control on the user form, then it is still the same problem but this time you need to click on that control on the user form, and verify its name in the object properties window.

Once you fix the name of the object, or change the code to use the actual object name, then it should work without problems.
 
Upvote 0
You're welcome.

May I ask what the exact problem was in your code, and how you solved it if it is solved?
Sorry I did not respond to you on this. Not been back to the VBA for a while so not sure. But again thanks for your response.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

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