new issue- trouble with "Load frmFormName"

hoosiergoody

New Member
Joined
Mar 4, 2008
Messages
25
So has there been a recent Excel update that would cause the vba code saying "Load frmFormName" to now cause this error:
"Run-time error '380': Could not set the List property. Invalid property value."

Using this same command worked for 2 years, and now all of the sudden it fails...

any help would be greatly appreciated!
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,277
Sounds like there's problems in the Activate/Initialize event of the userform and/or with the method you are using to populate a listbox/combobox on the form.

The first thing to do is, if there is one, to identify the line of code causing the problem.

To do that you have a couple of options.

1 Open the userform in design mode and start it by pressing F5.

2 Goto Tools>Options..., on the General tab set the error checking option to Break on all errors or Break in class modules and then try running Load frmFormName again.
 

hoosiergoody

New Member
Joined
Mar 4, 2008
Messages
25
from what i can tell there are multiple list boxes being used within the form. Unfortunately i didn't create this one and am trouble-shooting. No changes were done to the code or the file. The macro worked until a week ago. Excel16 is what is being used.
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
22,683
Set a breakpoint and step through the program and find out which line (probably in the userform's code module) is causing the error.
 

hoosiergoody

New Member
Joined
Mar 4, 2008
Messages
25
Mike- i appreciate your help...

it crashes at this command:
"Load frmCreateDisco"

I can change the form name in the properties and then the command to that new name (hence using the generic "Load frmFormName" in my explanation above).
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
22,683
Sometimes a line inside the uf code module causes an error, but when the VBEditor reactes it masks that by showing the Load (or .Show) line as the error line.
A Breakpoint plus stepping through the Intialize code reveals the true line that caused the error.

Other than that, unless we can see your Initialize code, I can't help.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,277
If it crashes at that line it's more than likely the problem lies in the forms Activate/Initialize event code, as Mike and I suggested.

If you try what we've suggested you should be able to find the root of the problem, or at least identify which control on the form it's affecting.
 

hoosiergoody

New Member
Joined
Mar 4, 2008
Messages
25
Not enough coffee before i fully answered. My apologies. after stepping through, i got to this point: "Me.cboGBPDate.List = vDates"

in that picklist for the "GBPDate" list, it was past the last valid date. Therefore, not an Excel update or VBA issue.

To Mike and Norie thank you both for your replies and for your patience. Have a great day!
 

Forum statistics

Threads
1,077,662
Messages
5,335,564
Members
399,025
Latest member
alce

Some videos you may like

This Week's Hot Topics

Top