Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Multiple criteria...

I'm relatively new to programming so forgive me if I have trouble conveying
my question properly. Is it possible to show a new UserForm based on meeting
three criteria? In my case, I have multiple door sizes that are available
but only when a certain criterion have been met, i.e. "25belt-full swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up" only has one
size.

Now I want to make a UserForm "pop up" when the conditions are right, that
have the opening sizes so I don't have too many grayed out selections when
choices are not applicable. So in the example above I would think I need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps give a
understanding of what I'm looking for. Thank you in advance for any
assistance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Multiple criteria...

your code looks fine so long as you have a userform called Opening

why don't you populate a LISTBOX with the available sizes?

"Cerberus" wrote in message
...
I'm relatively new to programming so forgive me if I have trouble
conveying
my question properly. Is it possible to show a new UserForm based on
meeting
three criteria? In my case, I have multiple door sizes that are available
but only when a certain criterion have been met, i.e. "25belt-full
swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up" only has
one
size.

Now I want to make a UserForm "pop up" when the conditions are right, that
have the opening sizes so I don't have too many grayed out selections when
choices are not applicable. So in the example above I would think I need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps give
a
understanding of what I'm looking for. Thank you in advance for any
assistance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Multiple criteria...

Thank you for your response

I not sure a LISTBOX would work well with all the variables I have. See, I
have 6 different belt sizes, 6 different door options and 26 different door
openings. While the 25Belt option has up to 11 door opening options and
31Belt has 8, the 48Belt option only has 1. I don't want to give the
impression that you could have multiple options to the belts that are limited
to one opening size.

Now of course you have much more experience than I do about all of this, so
if you know of a trick to make a LISTBOX work properly I would be more than
happy to listen to your idea.

"Patrick Molloy" wrote:

your code looks fine so long as you have a userform called Opening

why don't you populate a LISTBOX with the available sizes?

"Cerberus" wrote in message
...
I'm relatively new to programming so forgive me if I have trouble
conveying
my question properly. Is it possible to show a new UserForm based on
meeting
three criteria? In my case, I have multiple door sizes that are available
but only when a certain criterion have been met, i.e. "25belt-full
swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up" only has
one
size.

Now I want to make a UserForm "pop up" when the conditions are right, that
have the opening sizes so I don't have too many grayed out selections when
choices are not applicable. So in the example above I would think I need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps give
a
understanding of what I'm looking for. Thank you in advance for any
assistance.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Multiple criteria...

On Jun 2, 2:28*pm, Cerberus wrote:

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
* * *Opening.Show
End If


That will work fine.
If you want to cover all possible combinations then it might get a bit
complicated. You can create a userform on the fly, in code, to suit
your requirements. That does get a bit tricky if you want arbitrary
numbers of controls on the form though, as arrays of controls are not
supported and you need to write wrapper classes to emulate the
function. Probably more work than you want.

I tend to use a structure a bit like this, using a binary encoding
scheme and noting that "True" = -1

Select Case -1 * Start.Option25belt _
- 2 * Door.OptionFullSwing.Value _
- 4 * Door.Option.Flipup.Value
Case 0
Userform1.Show
Case 1
Userform2.Show
Case 2, 4
Userform3.Show
Case 3, 5, 7
Userform4.Show
Case 6
Userform5.Show
Case Else
MsgBox "How the heck did that happen?"
End Select

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Multiple criteria...

so when the user selects a 31Belt, the code will (1) clear the door opening
sizes from the listbox then (2) add the door options for that particular
belt

I can send a file to you directly if you would like to see what i mean...
excel; 2003 or 2007

"Cerberus" wrote in message
...
Thank you for your response

I not sure a LISTBOX would work well with all the variables I have. See,
I
have 6 different belt sizes, 6 different door options and 26 different
door
openings. While the 25Belt option has up to 11 door opening options and
31Belt has 8, the 48Belt option only has 1. I don't want to give the
impression that you could have multiple options to the belts that are
limited
to one opening size.

Now of course you have much more experience than I do about all of this,
so
if you know of a trick to make a LISTBOX work properly I would be more
than
happy to listen to your idea.

"Patrick Molloy" wrote:

your code looks fine so long as you have a userform called Opening

why don't you populate a LISTBOX with the available sizes?

"Cerberus" wrote in message
...
I'm relatively new to programming so forgive me if I have trouble
conveying
my question properly. Is it possible to show a new UserForm based on
meeting
three criteria? In my case, I have multiple door sizes that are
available
but only when a certain criterion have been met, i.e. "25belt-full
swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up" only
has
one
size.

Now I want to make a UserForm "pop up" when the conditions are right,
that
have the opening sizes so I don't have too many grayed out selections
when
choices are not applicable. So in the example above I would think I
need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps
give
a
understanding of what I'm looking for. Thank you in advance for any
assistance.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Multiple criteria...

Thank you, 2007 please.

"Patrick Molloy" wrote:

so when the user selects a 31Belt, the code will (1) clear the door opening
sizes from the listbox then (2) add the door options for that particular
belt

I can send a file to you directly if you would like to see what i mean...
excel; 2003 or 2007

"Cerberus" wrote in message
...
Thank you for your response

I not sure a LISTBOX would work well with all the variables I have. See,
I
have 6 different belt sizes, 6 different door options and 26 different
door
openings. While the 25Belt option has up to 11 door opening options and
31Belt has 8, the 48Belt option only has 1. I don't want to give the
impression that you could have multiple options to the belts that are
limited
to one opening size.

Now of course you have much more experience than I do about all of this,
so
if you know of a trick to make a LISTBOX work properly I would be more
than
happy to listen to your idea.

"Patrick Molloy" wrote:

your code looks fine so long as you have a userform called Opening

why don't you populate a LISTBOX with the available sizes?

"Cerberus" wrote in message
...
I'm relatively new to programming so forgive me if I have trouble
conveying
my question properly. Is it possible to show a new UserForm based on
meeting
three criteria? In my case, I have multiple door sizes that are
available
but only when a certain criterion have been met, i.e. "25belt-full
swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up" only
has
one
size.

Now I want to make a UserForm "pop up" when the conditions are right,
that
have the opening sizes so I don't have too many grayed out selections
when
choices are not applicable. So in the example above I would think I
need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps
give
a
understanding of what I'm looking for. Thank you in advance for any
assistance.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Multiple criteria...

sent

"Cerberus" wrote in message
...
Thank you, 2007 please.

"Patrick Molloy" wrote:

so when the user selects a 31Belt, the code will (1) clear the door
opening
sizes from the listbox then (2) add the door options for that particular
belt

I can send a file to you directly if you would like to see what i
mean...
excel; 2003 or 2007

"Cerberus" wrote in message
...
Thank you for your response

I not sure a LISTBOX would work well with all the variables I have.
See,
I
have 6 different belt sizes, 6 different door options and 26 different
door
openings. While the 25Belt option has up to 11 door opening options
and
31Belt has 8, the 48Belt option only has 1. I don't want to give the
impression that you could have multiple options to the belts that are
limited
to one opening size.

Now of course you have much more experience than I do about all of
this,
so
if you know of a trick to make a LISTBOX work properly I would be more
than
happy to listen to your idea.

"Patrick Molloy" wrote:

your code looks fine so long as you have a userform called Opening

why don't you populate a LISTBOX with the available sizes?

"Cerberus" wrote in message
...
I'm relatively new to programming so forgive me if I have trouble
conveying
my question properly. Is it possible to show a new UserForm based
on
meeting
three criteria? In my case, I have multiple door sizes that are
available
but only when a certain criterion have been met, i.e. "25belt-full
swing-flip
up" has multiple opening sizes but a "48belt-full swing-flip up"
only
has
one
size.

Now I want to make a UserForm "pop up" when the conditions are
right,
that
have the opening sizes so I don't have too many grayed out
selections
when
choices are not applicable. So in the example above I would think I
need
something like (and this is where I have the lack of knowledge):

If Start.Option25belt.Value = True And _
Door.OptionFullSwing.Value = True And _
Door.OptionFlipUp.Value = True Then
Opening.Show
End If

I'm sure that is not even close to being correct but I hope it helps
give
a
understanding of what I'm looking for. Thank you in advance for any
assistance.

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
SUMIFS, one criteria range, multiple criteria GavinS Excel Worksheet Functions 2 September 7th 11 05:40 PM
Match / Index multiple criteria return multiple results Marty Excel Worksheet Functions 2 May 22nd 10 01:49 PM
match multiple criteria ina range from multiple criteria multiplet RG Excel Worksheet Functions 8 September 28th 07 04:21 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Saleem Excel Worksheet Functions 1 January 12th 05 10:54 AM
Counting Cells with multiple criteria.One criteria supporting wild Azhar Arain Excel Worksheet Functions 1 January 12th 05 08:33 AM


All times are GMT +1. The time now is 02:42 PM.

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

About Us

"It's about Microsoft Excel"