#1   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default 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



  #7   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default form help!!


Hi Bernie,

Sorry for the late reply, was moved to a different project, so could
complete. But i'm back and stil stuck.

I don't understand what to do, in regards to your last reply.
I'm not sure what some variable should be e.g:

If frmsysenq.Frame1.optAS400 = True Then SomeVariable = 1
SomeVariable should open the Tab i want? how would I code this?

Thanks


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=519689

  #8   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default form help!!

harpscardiff,

Reply to me - take out the spaces and change the dot to . - and I will send you a working example.

Or post a working address in reply to this message.....

HTH,
Bernie
MS Excel MVP


"harpscardiff" wrote in message
news:harpscardiff.25shgm_1144237201.2621@excelforu m-nospam.com...

Hi Bernie,

Sorry for the late reply, was moved to a different project, so could
complete. But i'm back and stil stuck.

I don't understand what to do, in regards to your last reply.
I'm not sure what some variable should be e.g:

If frmsysenq.Frame1.optAS400 = True Then SomeVariable = 1
SomeVariable should open the Tab i want? how would I code this?

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
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
user form question: text box to display result BigPig Excel Discussion (Misc queries) 0 February 28th 06 12:33 AM
user form question: text box to display result BigPig Excel Worksheet Functions 0 February 25th 06 08:17 PM
Access Form In An Access Report (SubForm) Question Gary Links and Linking in Excel 0 January 27th 06 05:54 AM
Automatically display sentence. Rao Ratan Singh New Users to Excel 2 January 17th 06 06:53 PM
how can I make a form number change everytime the form is opened babydumplingspita Excel Worksheet Functions 1 October 10th 05 07:58 PM


All times are GMT +1. The time now is 04:35 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"