Button suddenly failing to load userform

RockandGrohl

Active Member
Joined
Aug 1, 2018
Messages
494
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.
 

RockandGrohl

Active Member
Joined
Aug 1, 2018
Messages
494
Office Version
  1. 2010
Platform
  1. Windows
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.
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
50,903
Office Version
  1. 365
Platform
  1. Windows
That's a new one to me, so no idea. :(
 

RockandGrohl

Active Member
Joined
Aug 1, 2018
Messages
494
Office Version
  1. 2010
Platform
  1. Windows
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...
 

Watch MrExcel Video

Forum statistics

Threads
1,118,800
Messages
5,574,399
Members
412,589
Latest member
Velly
Top