Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
I've created a user form (for the 1st time!) with 4 control frames and 2
command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
You design and modify userforms in the VBA editor. You test them
in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
I should have added that you can press F5 with the form active in
the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
Fantastic! Thank you very much.
Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
How about something like:
Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub OptionButton1_Click() Me.OptionButton3.Enabled = True Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Private Sub OptionButton2_Click() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = True Me.OptionButton5.Enabled = True End Sub Private Sub UserForm_Initialize() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Debra Dalgleish has a getstarted with userforms at: http://www.contextures.com/xlUserForm01.html monir wrote: Fantastic! Thank you very much. Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
Dave;
Thank you for your help! It works. Will review Debra's link shortly. "Dave Peterson" wrote: How about something like: Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub OptionButton1_Click() Me.OptionButton3.Enabled = True Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Private Sub OptionButton2_Click() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = True Me.OptionButton5.Enabled = True End Sub Private Sub UserForm_Initialize() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Debra Dalgleish has a getstarted with userforms at: http://www.contextures.com/xlUserForm01.html monir wrote: Fantastic! Thank you very much. Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
Is it possible to minimize the XL w/b and leaves the user form on display ?? I've tried Application.WindowState = XlMinimized , in the standard macro showing the form. It doesn't yield the desired result! For this particular application, there is no need (or use) of the host w/b once the form is displayed. The selected option controls on the form identify the applicable procedures, and the command controls take care of locating the procedures on the system, open the relevant files, and unload the form. Now since it does not appear possible to show the form without its host w/b, at least get it out of the way by minimizing it !!!! (XL 2003, Windows XP) Any suggestions ?? Thank you. "monir" wrote: Dave; Thank you for your help! It works. Will review Debra's link shortly. "Dave Peterson" wrote: How about something like: Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub OptionButton1_Click() Me.OptionButton3.Enabled = True Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Private Sub OptionButton2_Click() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = True Me.OptionButton5.Enabled = True End Sub Private Sub UserForm_Initialize() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Debra Dalgleish has a getstarted with userforms at: http://www.contextures.com/xlUserForm01.html monir wrote: Fantastic! Thank you very much. Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. -- Dave Peterson |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
When the UserForm is loaded, set Application.Visible = False. Set it back to
True when the UserForm is dismissed, -- Vasant "monir" wrote in message ... Is it possible to minimize the XL w/b and leaves the user form on display ?? I've tried Application.WindowState = XlMinimized , in the standard macro showing the form. It doesn't yield the desired result! For this particular application, there is no need (or use) of the host w/b once the form is displayed. The selected option controls on the form identify the applicable procedures, and the command controls take care of locating the procedures on the system, open the relevant files, and unload the form. Now since it does not appear possible to show the form without its host w/b, at least get it out of the way by minimizing it !!!! (XL 2003, Windows XP) Any suggestions ?? Thank you. "monir" wrote: Dave; Thank you for your help! It works. Will review Debra's link shortly. "Dave Peterson" wrote: How about something like: Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub OptionButton1_Click() Me.OptionButton3.Enabled = True Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Private Sub OptionButton2_Click() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = True Me.OptionButton5.Enabled = True End Sub Private Sub UserForm_Initialize() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Debra Dalgleish has a getstarted with userforms at: http://www.contextures.com/xlUserForm01.html monir wrote: Fantastic! Thank you very much. Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. -- Dave Peterson |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
User Form Interface .... really a simple question!
Vasant;
Perfect! Thank you. "Vasant Nanavati" wrote: When the UserForm is loaded, set Application.Visible = False. Set it back to True when the UserForm is dismissed, -- Vasant "monir" wrote in message ... Is it possible to minimize the XL w/b and leaves the user form on display ?? I've tried Application.WindowState = XlMinimized , in the standard macro showing the form. It doesn't yield the desired result! For this particular application, there is no need (or use) of the host w/b once the form is displayed. The selected option controls on the form identify the applicable procedures, and the command controls take care of locating the procedures on the system, open the relevant files, and unload the form. Now since it does not appear possible to show the form without its host w/b, at least get it out of the way by minimizing it !!!! (XL 2003, Windows XP) Any suggestions ?? Thank you. "monir" wrote: Dave; Thank you for your help! It works. Will review Debra's link shortly. "Dave Peterson" wrote: How about something like: Option Explicit Private Sub CommandButton1_Click() Unload Me End Sub Private Sub OptionButton1_Click() Me.OptionButton3.Enabled = True Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Private Sub OptionButton2_Click() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = True Me.OptionButton5.Enabled = True End Sub Private Sub UserForm_Initialize() Me.OptionButton3.Enabled = False Me.OptionButton4.Enabled = False Me.OptionButton5.Enabled = False End Sub Debra Dalgleish has a getstarted with userforms at: http://www.contextures.com/xlUserForm01.html monir wrote: Fantastic! Thank you very much. Now the user interface works fine, as far as clicking the various option buttons and the tab order for the controls are concerned. However, there is a slight slef-imposed problem (still within the scope of user interface)! Since I've not yet developed all the algorithms for the full matrix of option selections, I've to limit my use of the form (for now) to only certain options from the predefined lists. Let me explain. Suppose the 1st control frame is named grpA , and has 2 option control buttons named: opt1 , opt2 The 2nd control frame is named grpB , and has 3 option control buttons named: opt3 , opt4 , opt5 If opt1 is selected (in grpA) on the form, then opt4 and opt5 (in grpB) should be disabled. If opt2 is selected (in grpA), then opt3 (in grpB) should be disabled. If isn't too much trouble, could you please show me how to encode the above conditions using the option button names, and where to place these conditions. In the UserForm_Click () event ?? Thank you. "Chip Pearson" wrote: I should have added that you can press F5 with the form active in the VBA Editor to run the form. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Chip Pearson" wrote in message ... You design and modify userforms in the VBA editor. You test them in Excel. Create a simple macro in a standard code module (not the form's code module) to show the form. Run this macro to test your form in Excel. Sub ShowTheForm() Userform1.Show End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "monir" wrote in message ... I've created a user form (for the 1st time!) with 4 control frames and 2 command buttons. Each frame has a number of option buttons. One option in each frame is selected as the default option. I've even added an image to make the form a bit fancier !! So far so good. Now, I'm trying to test this user interface before I add the functionality to the form. Trying to click an option button, its control frame and its group frame appear ! The user form appears to be stuck in its design mode, despite the fact that the design mode (on the Tool bar) is not on. What did I do wrong ? How to exit this design mode ? Do I have to add something to the UserForm_Click () event, at this early stage, to run / test the form ? Thank you kindly. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a user interface form | Excel Discussion (Misc queries) | |||
Looking to create a simple user form with lookup | Excel Discussion (Misc queries) | |||
QUI Expert: Excel-based User Interface or OO User Interface? | Excel Programming | |||
GUI Expert: Excel-based User Interface or OO User Interface? | Excel Programming | |||
Use a simple Drop Down List or User Form | Excel Programming |