Using a dropdown as a menu

MartinL

Well-known Member
Joined
Oct 16, 2008
Messages
1,141
Office Version
  1. 365
Platform
  1. Windows
I am trying to use a dropdown box as a menu system
so a user can jump through worksheets froma front page.

I have seen lots of snippits of code that appear to do what I want but none seem to work for me.
i.e. http://www.mrexcel.com/forum/showthread.php?t=362630&highlight=dropdown

I have a selection macro which works but need to activate it via the dropdown. I guess a chage event is needed......or am I mistaken.

Rich (BB code):
Sub Selection()
Rich (BB code):
Select Case Range("AF16").Value 
      Case 1
      Sheets("Asparagus").Visible = True
      Sheets("Asparagus").Select
      Sheets("Intro").Visible = False
      Case 2
      Sheets("Broccoli Cauli").Visible = True
      Sheets("Broccoli Cauli").Select
      Sheets("Intro").Visible = False
      Case 3
      Sheets("Peas Beans").Visible = True
      Sheets("Peas Beans").Select
      Sheets("Intro").Visible = False
      Case 4
      Sheets("Prep Basic Solo").Visible = True
      Sheets("Prep Basic Solo").Select
      Sheets("Intro").Visible = False
      Case 5
      Sheets("Prep Mixed Bag").Visible = True
      Sheets("Prep Mixed Bag").Select
      Sheets("Intro").Visible = False
       Case 6
      Sheets("Prep Single Packs").Visible = True
      Sheets("Prep Single Packs").Select
      Sheets("Intro").Visible = False
      Case 7
      Sheets("Speciality Veg").Visible = True
      Sheets("Speciality Veg").Select
      Sheets("Intro").Visible = False
      Case 8
      Sheets("Stirfry").Visible = True
      Sheets("Stirfry").Select
      Sheets("Intro").Visible = False
  End Select
End Sub
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Try this: right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "AF16" Then
    Select Case Target.Value
          Case 1
          Sheets("Asparagus").Visible = True
          Sheets("Asparagus").Select
          Sheets("Intro").Visible = False
          Case 2
          Sheets("Broccoli Cauli").Visible = True
          Sheets("Broccoli Cauli").Select
          Sheets("Intro").Visible = False
          Case 3
          Sheets("Peas Beans").Visible = True
          Sheets("Peas Beans").Select
          Sheets("Intro").Visible = False
          Case 4
          Sheets("Prep Basic Solo").Visible = True
          Sheets("Prep Basic Solo").Select
          Sheets("Intro").Visible = False
          Case 5
          Sheets("Prep Mixed Bag").Visible = True
          Sheets("Prep Mixed Bag").Select
          Sheets("Intro").Visible = False
           Case 6
          Sheets("Prep Single Packs").Visible = True
          Sheets("Prep Single Packs").Select
          Sheets("Intro").Visible = False
          Case 7
          Sheets("Speciality Veg").Visible = True
          Sheets("Speciality Veg").Select
          Sheets("Intro").Visible = False
          Case 8
          Sheets("Stirfry").Visible = True
          Sheets("Stirfry").Select
          Sheets("Intro").Visible = False
      End Select
End If
End Sub
 
Upvote 0
Hi Peter/Jeff

Thanks for you r suggestions

Peter you answered my question and it works great

Jeff your link was beautiful.....

Martin

Martin
 
Upvote 0
Hi Jeff

You sent me a beautiful bit of code that can be used as a menu system

http://www.xl-logic.com/modules.php?...rform_Examples

If you have used this yourself do you know if it can be:
a) set up to be always active
b) positioned in a certain place on the screen (currently it is centered on the screen) without moving it.

Martin
 
Upvote 0
Hi Martin,

Off the top of my head I do not have an answer for your questions.

I would just have to start a search here or maybe google.
 
Upvote 0
Thanks Jeff

Google is my buddy
just found this which works:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=356

The always active won't work anyway as it will stop the user using the sheet so I'll stick to training the user how to press the big pink button to show and the red cross to hide the userform (menu).

Martin

Martin
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,608
Members
452,930
Latest member
racefanjtd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top