Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
Ok, this is such a rediculously simple problem, I am almost to embarrassed to ask. After searching high and low, I cannot for the lif of me figure out how to display one userform, when a user clicks on button in another? A simple Userform2.show does not work- the code breaks with an "objec required" error. I know I'm going to kick myself when I see the answer ... (can yo delete topics you stated yourself so i can hang my head in shame? -- CF ----------------------------------------------------------------------- CFD's Profile: http://www.excelforum.com/member.php...fo&userid=2730 View this thread: http://www.excelforum.com/showthread.php?threadid=47365 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
Hi CFD,
I could not reproduce your error and Private Sub CommandButton1_Click() UserForm2.Show End Sub worked for me. --- Regards, Norman "CFD" wrote in message ... Ok, this is such a rediculously simple problem, I am almost too embarrassed to ask. After searching high and low, I cannot for the life of me figure out how to display one userform, when a user clicks on a button in another? A simple Userform2.show does not work- the code breaks with an "object required" error. I know I'm going to kick myself when I see the answer ... (can you delete topics you stated yourself so i can hang my head in shame?) -- CFD ------------------------------------------------------------------------ CFD's Profile: http://www.excelforum.com/member.php...o&userid=27306 View this thread: http://www.excelforum.com/showthread...hreadid=473653 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
Hmmm was your command button on a different userform, or on worksheet? I can get it to open using a button on a worksheet, but not a button o a different user form -- CF ----------------------------------------------------------------------- CFD's Profile: http://www.excelforum.com/member.php...fo&userid=2730 View this thread: http://www.excelforum.com/showthread.php?threadid=47365 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
Perhaps you are not putting your code in the correct location:
1. Open your VB editor 2. Select Userform1 3. Dbl click on the command button to view the code for this button 4. Paste Norman Jones code in this module. It's not a normal module, but rather a special kind of module that contains the code for the userform1 and associated controls, like buttons. HTH "CFD" wrote: Ok, this is such a rediculously simple problem, I am almost too embarrassed to ask. After searching high and low, I cannot for the life of me figure out how to display one userform, when a user clicks on a button in another? A simple Userform2.show does not work- the code breaks with an "object required" error. I know I'm going to kick myself when I see the answer ... (can you delete topics you stated yourself so i can hang my head in shame?) -- CFD ------------------------------------------------------------------------ CFD's Profile: http://www.excelforum.com/member.php...o&userid=27306 View this thread: http://www.excelforum.com/showthread...hreadid=473653 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
Thanks cush. My code is certainly in the right place, associated with the correct button on the userform ... Here is the code associated with the button Code: -------------------- Private Sub CommandButton1_Click() ' store data on variables worksheet Worksheets("variables").Range("curinitials").Value = initials.Value Worksheets("variables").Range("curbarcpref").Value = barcpref.Value Worksheets("variables").Range("curbarcfin").Value = barcfin.Value ' hide first step userform Box_details.Hide 'show secondstep userform box_contents.Show End Sub -------------------- Box_details is the first userform (on which CommandButton1 is located), box_contents is the userform for the next step. The code dies at the "box_contents.Show" point. -- CFD ------------------------------------------------------------------------ CFD's Profile: http://www.excelforum.com/member.php...o&userid=27306 View this thread: http://www.excelforum.com/showthread...hreadid=473653 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Displaying one userform from another
FIXED .... it was an error in the initialize routine for the second userform!!! The code broke at the command button point and not in the initialization script, which led me to think it was the display that was the problem! So sorry to have wasted all your time, (as he shrinks back in the corner feeling very embarrassed!). It is however annoying that it broke at the command button point, and not the point in the initializer routine that was the problem! Made tracking the error very difficult! -- CFD ------------------------------------------------------------------------ CFD's Profile: http://www.excelforum.com/member.php...o&userid=27306 View this thread: http://www.excelforum.com/showthread...hreadid=473653 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform for displaying values from a row | Excel Discussion (Misc queries) | |||
PROBLEM DISPLAYING USERFORM | Excel Programming | |||
UserForm Toolbox displaying | Excel Programming | |||
displaying picture in a userform | Excel Programming | |||
Displaying progress on UserForm | Excel Programming |