Excel VBA problem...

bphall

New Member
Joined
Mar 8, 2011
Messages
11
Not sure what happened as my form was working fine a few minutes ago, and now it's not working.

I'm getting a Run-time error '424' Object required now when naturally I wasn't before.

I'm trying to initalize my userform with a bunch of list boxes and a couple of combo boxes. Earlier it was working fine, after I started on my Clear form button code it all when wonky. Now it won't load any of the list boxes or combo boxes.

When I debug, it highlights the Private Sub UserForm_Initialize() and won't move off.

Help please!!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

bphall

New Member
Joined
Mar 8, 2011
Messages
11
Please post your initialize and clear codes
Sorry, newbie

Private Sub UserForm_Initialize()
cbxDistrict.AddItem "GOM"
cbxDistrict.AddItem "Northeast"
cbxDistrict.AddItem "Mid-Con"
cbxDistrict.AddItem "Rockies"
cbxDistrict.AddItem "South East"
cbxDistrict.AddItem "South Texas"
cbxDistrict.AddItem "West Coast"
cbxDistrict.AddItem "West Texas"
cbxDistrict.AddItem "Other"
cbxLocation.AddItem " Alice "
cbxLocation.AddItem " Alvarado "
cbxLocation.AddItem " Bakersfield "
cbxLocation.AddItem " Bossier "
cbxLocation.AddItem " Brighton "
cbxLocation.AddItem " Caldwell "
cbxLocation.AddItem " Canonsburg "
cbxLocation.AddItem " Casper "
cbxLocation.AddItem " Farmington "
cbxLocation.AddItem " Fort Smith "
cbxLocation.AddItem " Grand Junction "
cbxLocation.AddItem " Hobbs "
cbxLocation.AddItem " Jacksboro "
cbxLocation.AddItem " Kilgore "
cbxLocation.AddItem " Laurel "
cbxLocation.AddItem " Liberal "
cbxLocation.AddItem " Montgomery "
cbxLocation.AddItem " New Iberia "
cbxLocation.AddItem " Odessa "
cbxLocation.AddItem " Pauls Valley "
cbxLocation.AddItem " Rocksprings "
cbxLocation.AddItem " Vernal "
cbxLocation.AddItem " Victoria "
cbxLocation.AddItem " Woodland "
cbxLocation.AddItem " Woodward "
cbxLocation.AddItem " Other "
lstLoggingServiceType.AddItem " ASAT "
lstLoggingServiceType.AddItem " ASR "
lstLoggingServiceType.AddItem " BCAS "
lstLoggingServiceType.AddItem " BSAT "
lstLoggingServiceType.AddItem " CAST "
lstLoggingServiceType.AddItem " CBL "
lstLoggingServiceType.AddItem " CSNG "
lstLoggingServiceType.AddItem " DIR "
lstLoggingServiceType.AddItem " EMI "
lstLoggingServiceType.AddItem " FIAC "
lstLoggingServiceType.AddItem " FWS "
lstLoggingServiceType.AddItem " GEMT "
lstLoggingServiceType.AddItem " HEDT "
lstLoggingServiceType.AddItem " HFWS "
lstLoggingServiceType.AddItem " HWST "
lstLoggingServiceType.AddItem " ICT "
lstLoggingServiceType.AddItem " IDT "
lstLoggingServiceType.AddItem " ISAT "
lstLoggingServiceType.AddItem " MIT "
lstLoggingServiceType.AddItem " MRIL "
lstLoggingServiceType.AddItem " None "
lstLoggingServiceType.AddItem " OMRI "
lstLoggingServiceType.AddItem " OYO "
lstLoggingServiceType.AddItem " PLT "
lstLoggingServiceType.AddItem " QUAD "
lstLoggingServiceType.AddItem " RCBL "
lstLoggingServiceType.AddItem " RDT "
lstLoggingServiceType.AddItem " RMTE "
lstLoggingServiceType.AddItem " SED "
lstLoggingServiceType.AddItem " SFT "
lstLoggingServiceType.AddItem " SPFL "
lstLoggingServiceType.AddItem " TMDL "
lstLoggingServiceType.AddItem " TRIPLE "
lstLoggingServiceType.AddItem " TVD "
lstLoggingServiceType.AddItem " WST "
lstLoggingServiceType.AddItem " XRMI "
lstbxAcoustic.AddItem " Anisotropy Analysis "
lstbxAcoustic.AddItem " Compressional & Shear "
lstbxAcoustic.AddItem " Compressional Repair "
lstbxAcoustic.AddItem " Fracture Identification "
lstbxAcoustic.AddItem " FracXpert "
lstbxAcoustic.AddItem " Repairs "
lstbxAcoustic.AddItem " RockXpert2 "
lstbxAcoustic.AddItem " Stoneley Analysis (Permeability) "
lstbxImaging.AddItem " Dip Analysis "
lstbxImaging.AddItem " Facies Profile "
lstbxImaging.AddItem " Fractures "
lstbxImaging.AddItem " Geological Report "
lstbxImaging.AddItem " Imaging "
lstbxImaging.AddItem " Net2Gross Sand Count "
lstbxAnalysis.AddItem " 3D Vertical Stress "
lstbxAnalysis.AddItem " Borehole Breakout "
lstbxAnalysis.AddItem " Chi Modeling "
lstbxAnalysis.AddItem " CLAMS "
lstbxAnalysis.AddItem " Complex Lithology Analisys (CORAL) "
lstbxAnalysis.AddItem " Directional Survey "
lstbxAnalysis.AddItem " GEM "
lstbxAnalysis.AddItem " Laminated Reservoir Analysis (LARA) "
lstbxAnalysis.AddItem " Multi-Mineral Evaluation Program (ULTRA) "
lstbxAnalysis.AddItem " Shale Evaluation "
lstbxAnalysis.AddItem " Shaly Sand Analysis (SASHA) "
lstbxAnalysis.AddItem " StimLog "
lstbxAnalysis.AddItem " T.V.D "
lstbxCasedHole.AddItem " 3D Pictures "
lstbxCasedHole.AddItem " ACE - Advanced Cement Evaluation "
lstbxCasedHole.AddItem " CASE - Casing Inspection "
lstbxCasedHole.AddItem " PL - Three-Phase Analysis "
lstbxCasedHole.AddItem " PL - Build up, Fall off (PTA) "
lstbxCasedHole.AddItem " PL - Formation Compaction Analysis "
lstbxCasedHole.AddItem " PL - Multi-Rate, Multi-Zone (MRMZ) "
lstbxCasedHole.AddItem " PL - Single Phase Analysis "
lstbxCasedHole.AddItem " PL - Two-Phase Analysis "
lstbxCasedHole.AddItem " PNL - CarbOxSat "
lstbxCasedHole.AddItem " PNL - SigmaSat "
lstbxCasedHole.AddItem " PNL - Spectra Flow "
lstbxCasedHole.AddItem " PNL - TripleSat "
lstbxNMR.AddItem " Density-Magnetic Resonance Analysis (MRD) "
lstbxNMR.AddItem " Enhanced Diffusion Method (EDM) "
lstbxNMR.AddItem " Fluid Characterization (2DFC) "
lstbxNMR.AddItem " Heavy Oil MRIAN (MRIAN HO) "
lstbxNMR.AddItem " Magnetic Resonance Imaging Analysis (MRIAN) "
lstbxNMR.AddItem " StiMRIL™ Process "
lstbxNMR.AddItem " T1 Analysis "
lstbxNMR.AddItem " Time Domain Analysis (TDA) "
lstbxSeismic.AddItem " 2D/3D Modeling "
lstbxSeismic.AddItem " CS "
lstbxSeismic.AddItem " Scal "
lstbxSeismic.AddItem " Syn "
lstbxSeismic.AddItem " ZVSP "
lstbxSeismic.AddItem " OVSP "
lstbxSeismic.AddItem " MO-VSP "
lstbxSeismic.AddItem " W-VSP "
lstbxSeismic.AddItem " SaltProx "
lstbxSeismic.AddItem " 3D-VSP "
lstbxSeismic.AddItem " AVO "
lstbxSeismic.AddItem " WAVSP "
lstbxTandS.AddItem " Pressure Analysis "
lstbxTandS.AddItem " Pressure Gradient "
lstbxTandS.AddItem " Sampling Analysis "
End Sub

it's all I have so far, let me know what else I need to post.
 

bphall

New Member
Joined
Mar 8, 2011
Messages
11
****, I'm blind. my list box name in the code was typed in as lst... when the actual name was lstbx...
 

Forum statistics

Threads
1,141,017
Messages
5,703,752
Members
421,313
Latest member
Mooncake1

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
Top