Button suddenly failing to load userform

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
788
Office Version
  1. 2010
Platform
  1. Windows
Hi all,

Since last week, this was working and absolutely nothing has changed. We have three buttons to load userforms. One of them is a control panel to load various buttons that execute macros and this works totally fine.

The other two are done when there is an active cell selected. It takes the information on that row and loads data, last week these were working as they have been for the last several years, but today it seems like they are broken inexplicably. No changes to the core working structure of this sheet have been made, or really any changes at all, since last week.

When I press either button, I get "Run Time Error 440, Automation Error" displayed.

Here is the code:

VBA Code:
Sub cpopen()

Load ControlPanel
ControlPanel.Show

End Sub

Sub pupopen()

Load PUpCheckBox
PUpCheckBox.Show

End Sub

Sub pcopen()

Load PCodeCheck
PCodeCheck.Show

End Sub

It's the PUpCheckBox and PCodeCheck that aren't working. When I mouse-over the name, it says "Object Variable or With Block variable not set"

The userforms are there and 100% correctly named in the object information window.


I loaded the 2019 version of this same sheet and confirmed the macros and userforms are set up 100% identically, yet this sheet has no problem loading the forms.
 
Nothing missing.

If I recreate the userform, and name it PCodeCheck it doesn't work with the Path access error. If I name it PCodeCheck1, and rename all VBA references to PCodeCheck1, the userform now correctly loads and performs the tasks I need it to.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
That's a new one to me, so no idea. :(
 
Upvote 0
That's a new one to me, so no idea. :(

Corruption banter, unexplained corruption banter.

Literally all objects, text boxes etc identical. All code behind it identical, just on a fresh Userform with a slightly different name and it works as usual.

Stupid Excel...
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,483
Members
448,967
Latest member
visheshkotha

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