UserForm Problem

K_Man95

Board Regular
Joined
Jul 31, 2002
Messages
158
I have a User Form that I am trying to open with a button click. I made a copy of one workbook with a new name. The Buttons and Macros were all copied as well. I modified the old Userform so that I can release Version 2 of the Userform, and now when I click on the button in Excel, I get the following error : Object doesn't support this property or method. Run-Time error '438'.

The code assigned to that button is as follows:

Sub Button121_Click()
'
' Button121_Click Macro
' Macro recorded 8/11/2002 by Kale Mayfield

'
UserForm1.Show

End Sub

What am I doing wrong? HELP!!!!!!!!! Once you have the Userform populated with ComboBoxes,Textboxes, etc., is there now way of making changes to that Userform? If you make changes and rearrange the locations of the buttons and boxes and labels... does that mess up the button in Excel that opens the form to begin with?

HELP!!
This message was edited by K_Man95 on 2002-11-07 21:23
 
Re: Double posting because I have no choice.

Randall

This is not correct.
Code:
Private Sub CMoverhaul_major_Initialize()
This is.
Code:
Private Sub UserForm_Initialize()
If you are having problems showing a userform then the problem might actually be in the code behind it.

I know it's annoying but VBA just works that way.

If there is a problem with code in the userform when you try to show it the only line highlighted is usually the the one used to show it.

A possible answer is to goto Tools>Options... and on the General tab select Break On All Errors in the Error Trapping section.


Like I say annoying but hopefully when you change that setting, if the error is in the code behind the form, you'll be taken to the line causing the problem.:)

PS Regarding the ability to edit posts, I don't think the 10 minute thing is too harsh and I don't think it has anything to do with spam.

Also it might actually be better to post again rather than editing.


Thanks, Randall, you saved me. Unfortunatelly I have found lots of error messages in web, like the discussed here, which said that it was a microsoft bug. In my case, I had run my xlsm sheet several times without any error. Suddenly the 438 error message showed up. So we think that really is a microsoft bug.


I strongly recommend to do what Randal told (bold ahead). My actual error was in populating a listbox with a sheet range.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Re: Double posting because I have no choice.

Gera_

If you are having problems with a userform it might be worth starting a new thread, this thread is kind of old.

PS That doesn't mean the advice I gave Randall in the quoted post doesn't stand any more.
 
Upvote 0
Re: Double posting because I have no choice.

Gera_

If you are having problems with a userform it might be worth starting a new thread, this thread is kind of old.

PS That doesn't mean the advice I gave Randall in the quoted post doesn't stand any more.


:eek: Ops! I am so sorry, Norie. First, you are so right. I didn't realize the original date when the question started. Second, I should thank you, not Randal. YOU actually saved me. Forgive an old man. So, for the people who read this, please, look at Norie's answers in the older coments. Norie's coments have the right solution.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,617
Members
449,039
Latest member
Mbone Mathonsi

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