Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 215
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a user interface form Thi Navy Excel Discussion (Misc queries) 1 September 21st 08 08:28 PM
Looking to create a simple user form with lookup Tim Excel Discussion (Misc queries) 5 November 14th 05 04:57 PM
QUI Expert: Excel-based User Interface or OO User Interface? Michael[_27_] Excel Programming 1 November 11th 04 01:53 PM
GUI Expert: Excel-based User Interface or OO User Interface? Michael[_27_] Excel Programming 0 November 11th 04 01:20 PM
Use a simple Drop Down List or User Form Ted Excel Programming 0 October 11th 04 09:37 PM


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"