ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Difficulties in VBA ( User form and option button) (https://www.excelbanter.com/excel-programming/280742-difficulties-vba-user-form-option-button.html)

paradise

Difficulties in VBA ( User form and option button)
 
Q1: I want to pass the value of a label in userform to a cell A2 in
the worksheet. how do i do it?


Q2: I have a series of userforms. After the user completed a question
in userform 1, Userform 2 will be loaded.
I have difficulty in writing a code which aloows user to go back
to Userform 1 to make changes. The program
shows that the form can't be loaded modally. Can anyone help?

Q3: Is there a way to ensure user must select from one of the option
buttons available, such as if he did not select any,
he will not be allow to proceed further?

Paul Robinson

Difficulties in VBA ( User form and option button)
 
Hi,
Q1 Use a textbox rather than a label control. Then for example
Worksheets("Sheets1").Range("A2").Value = TextBox1.Value

Q2. Sounds like you need a MultiPage control (from ToolBox) on ONE
userform. The user can switch back and forth between the pages. No
harder to initialise than a Userform.

Q3. Put all the buttons inside a frame control (from ToolBox).Put on
the frame control first, and the option buttons inside it. It will
force the first option to be selected on loading and only allow one
option to be chosen subsequently.

regards
Paul
(paradise) wrote in message . com...
Q1: I want to pass the value of a label in userform to a cell A2 in
the worksheet. how do i do it?


Q2: I have a series of userforms. After the user completed a question
in userform 1, Userform 2 will be loaded.
I have difficulty in writing a code which aloows user to go back
to Userform 1 to make changes. The program
shows that the form can't be loaded modally. Can anyone help?

Q3: Is there a way to ensure user must select from one of the option
buttons available, such as if he did not select any,
he will not be allow to proceed further?


Tom Ogilvy

Difficulties in VBA ( User form and option button)
 
Q1
Worksheets("Sheets1").Range("A2").Value = label1.Caption

will work as well.

--
Regards,
Tom Ogilvy


"Paul Robinson" wrote in message
om...
Hi,
Q1 Use a textbox rather than a label control. Then for example
Worksheets("Sheets1").Range("A2").Value = TextBox1.Value

Q2. Sounds like you need a MultiPage control (from ToolBox) on ONE
userform. The user can switch back and forth between the pages. No
harder to initialise than a Userform.

Q3. Put all the buttons inside a frame control (from ToolBox).Put on
the frame control first, and the option buttons inside it. It will
force the first option to be selected on loading and only allow one
option to be chosen subsequently.

regards
Paul
(paradise) wrote in message

. com...
Q1: I want to pass the value of a label in userform to a cell A2 in
the worksheet. how do i do it?


Q2: I have a series of userforms. After the user completed a question
in userform 1, Userform 2 will be loaded.
I have difficulty in writing a code which aloows user to go back
to Userform 1 to make changes. The program
shows that the form can't be loaded modally. Can anyone help?

Q3: Is there a way to ensure user must select from one of the option
buttons available, such as if he did not select any,
he will not be allow to proceed further?





All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com