Load sheet with drop down menu
Solved/Closed
Hello
I have the userform1, and a combo box linked to two cells callled "UNIVERSAL BOL" AND "BLANK BOL", plus two sheets called "BOL" and "BLANK BOL", I'm looking for a code that every time the user press UNIVERSAL BOL on the drop down menu,it calls the sheet BOL AND WITH BLANK BOL calls the BLANK BOL sheet.
Can someone help me, Thank you very much
I have the userform1, and a combo box linked to two cells callled "UNIVERSAL BOL" AND "BLANK BOL", plus two sheets called "BOL" and "BLANK BOL", I'm looking for a code that every time the user press UNIVERSAL BOL on the drop down menu,it calls the sheet BOL AND WITH BLANK BOL calls the BLANK BOL sheet.
Can someone help me, Thank you very much
Related:
- Load sheet with drop down menu
- Sheet right to left in google sheet - Guide
- Show volume in menu bar mac - Guide
- Windows network commands cheat sheet - Guide
- Huawei test menu - Guide
- Unable to load authentication library exiting ✓ - Counter Strike (CS) Forum
3 responses
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 20, 2010 at 05:54 AM
Jun 20, 2010 at 05:54 AM
on change of combo box needs to be defined
there you would do some thing like this
there you would do some thing like this
Private Sub ComboBox1_Change() If ComboBox1.Value = "UNIVERSAL BOL" Then Sheets("BOL").Select UserForm1.Hide ElseIf ComboBox1.Value = "BLANK BOL" Then Sheets("BLANK BOL").Select UserForm1.Hide End If End Sub
Hi,
This is the code I'm using:
Private Sub ComboBox1_Change()
If ComboBox1.Value = "UNIVERSAL BOL" Then
Sheets("BOL").Select
UserForm6.Hide
ElseIf ComboBox1.Value = "BLANK BOL" Then
Sheets("BLANK").Select
UserForm6.Hide
End If
Sheets15.Visible = xlSheetVisible
Sheets16.Visible = xlSheetVisible
End Sub
Private Sub CommandButton1_Click()
Sheet2.Visible = xlSheetVisible
Sheet15.Visible = xlSheetVeryHidden
Sheet16.Visible = xlSheetVeryHidden
Sheet3.Visible = xlSheetVeryHidden
UserForm6.Hide
End Sub
Private Sub CommandButton2_Click()
Sheet3.Visible = xlSheetVisible
Sheet15.Visible = xlSheetVeryHidden
Sheet16.Visible = xlSheetVeryHidden
Sheet2.Visible = xlSheetVeryHidden
UserForm6.Hide
End Sub
-----------------
Sheet15 is BOL, Sheet 16 is "BLANK". I have two more buttons in my form, with its own code, Private Sub CommandButton1_Click() and Private Sub CommandButton2_Click().
But I'm having problems with Private Sub ComboBox1_Change() its highlighting "Sheets("BOL").Select" in my my Private Sub ComboBox1_Change(), do you know why??
Thank you
This is the code I'm using:
Private Sub ComboBox1_Change()
If ComboBox1.Value = "UNIVERSAL BOL" Then
Sheets("BOL").Select
UserForm6.Hide
ElseIf ComboBox1.Value = "BLANK BOL" Then
Sheets("BLANK").Select
UserForm6.Hide
End If
Sheets15.Visible = xlSheetVisible
Sheets16.Visible = xlSheetVisible
End Sub
Private Sub CommandButton1_Click()
Sheet2.Visible = xlSheetVisible
Sheet15.Visible = xlSheetVeryHidden
Sheet16.Visible = xlSheetVeryHidden
Sheet3.Visible = xlSheetVeryHidden
UserForm6.Hide
End Sub
Private Sub CommandButton2_Click()
Sheet3.Visible = xlSheetVisible
Sheet15.Visible = xlSheetVeryHidden
Sheet16.Visible = xlSheetVeryHidden
Sheet2.Visible = xlSheetVeryHidden
UserForm6.Hide
End Sub
-----------------
Sheet15 is BOL, Sheet 16 is "BLANK". I have two more buttons in my form, with its own code, Private Sub CommandButton1_Click() and Private Sub CommandButton2_Click().
But I'm having problems with Private Sub ComboBox1_Change() its highlighting "Sheets("BOL").Select" in my my Private Sub ComboBox1_Change(), do you know why??
Thank you
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jun 20, 2010 at 09:05 AM
Jun 20, 2010 at 09:05 AM
BOL might be hidden. make it visible first