Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
Hi, I have two forms, 1) asks the user to select either 1, 2, 3, 4 or 5 (radio buttons). 2) the second form is questions based on the system they select on the 1st form, in a form of a multipage. Based on the system they selected, on the first form, I want the form to select that tab. So if the user selected system 1, the second form will popup, on the tab system 1. I've tried the following: Code: -------------------- Private Sub cmdOK6_Click() If optAS400 = True Then ActiveWorkbook.Sheets("AS400").Activate frmsysenq.show ' not sure how to select a tab End If End Sub -------------------- Cheers. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=519689 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
harpscardiff,
You set the multiplages value to 1 less than the page you want to show - the pages are 0 based, not 1 based, so something like frmsysenq1.MultiPage1.Value = ValueFromRadioButtons - 1 will show the correct page HTH, Bernie MS Excel MVP "harpscardiff" wrote in message news:harpscardiff.24av4y_1141735501.3499@excelforu m-nospam.com... Hi, I have two forms, 1) asks the user to select either 1, 2, 3, 4 or 5 (radio buttons). 2) the second form is questions based on the system they select on the 1st form, in a form of a multipage. Based on the system they selected, on the first form, I want the form to select that tab. So if the user selected system 1, the second form will popup, on the tab system 1. I've tried the following: Code: -------------------- Private Sub cmdOK6_Click() If optAS400 = True Then ActiveWorkbook.Sheets("AS400").Activate frmsysenq.show ' not sure how to select a tab End If End Sub -------------------- Cheers. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=519689 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
Hi Bernie, Thanks for your reply. I've tried was you said, but it doesnt work. The 1st form has 5 radio button and a Ok CMD button, once the user hits OK, thats when the 2nd form gets displayed. frmsysenq1- wont work, as I don't have a form called frmsysenq1 MultiPage1.Value = ValueFromRadioButtons = replaced with: MultiPage1.Value = optAS400 -1 - don't work either.... frmsysenq1.MultiPage1.Value = ValueFromRadioButtons - 1 Anything else I can try? Thanks -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=519689 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
frmsysenq1- wont work, as I don't have a form called frmsysenq1 I'm sorry - that should have been frmsysenq, since you used: frmsysenq.show Where are you storing the value from the radio buttons, and how are you reading them? They return true/false, so I assume you have code like If frmsysenq.Frame.OptionButton1 = True Then SomeVariable = 1 If frmsysenq.Frame.OptionButton2 = True Then SomeVariable = 2 If frmsysenq.Frame.OptionButton3 = True Then SomeVariable = 3 What is the name of the MultiPage? MultiPage1.Value = ValueFromRadioButtons = replaced with: MultiPage1.Value = optAS400 -1 - don't work either... Bernie MS Excel MVP |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
I'm not storing the value, apart from the the 2nd form, which is being transfered to the spreadsheet, (probably where i'm going wrong?), But basically the initial form links to the 2nd form, based on which option they use, should be the tab which is displayed. The multipage is called Multipage one. the pages are still called page1 thought to page5 The information from the 2nd form is dispalyed onto a spreadsheet, once they hit ok. There is OK button for each page - transfers data onto spreadsheet. There is a Cancel button for each page - hide form there is a clear button for each page - clears the values in the form thanks -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=519689 |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
form help!!
Then you need to read the optionbutton values, using code like
If frmsysenq.Frame.OptionButton1 = True Then SomeVariable = 1 If frmsysenq.Frame.OptionButton2 = True Then SomeVariable = 2 If frmsysenq.Frame.OptionButton3 = True Then SomeVariable = 3 If frmsysenq.Frame.OptionButton4 = True Then SomeVariable = 4 If frmsysenq.Frame.OptionButton5 = True Then SomeVariable = 5 and then use SomeVariable to set the multipage's value: frmsysenq.MultiPage1.Value = SomeVariable - 1 Bernie "harpscardiff" wrote in message news:harpscardiff.24ernb_1141917652.3706@excelforu m-nospam.com... I'm not storing the value, apart from the the 2nd form, which is being transfered to the spreadsheet, (probably where i'm going wrong?), But basically the initial form links to the 2nd form, based on which option they use, should be the tab which is displayed. The multipage is called Multipage one. the pages are still called page1 thought to page5 The information from the 2nd form is dispalyed onto a spreadsheet, once they hit ok. There is OK button for each page - transfers data onto spreadsheet. There is a Cancel button for each page - hide form there is a clear button for each page - clears the values in the form thanks -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960 View this thread: http://www.excelforum.com/showthread...hreadid=519689 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
user form question: text box to display result | Excel Discussion (Misc queries) | |||
user form question: text box to display result | Excel Worksheet Functions | |||
Access Form In An Access Report (SubForm) Question | Links and Linking in Excel | |||
Automatically display sentence. | New Users to Excel | |||
how can I make a form number change everytime the form is opened | Excel Worksheet Functions |