Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting a sheet based on a cell

I have an worksheet used to input data which includes a drop down list with
subjects, lets say by way of example -types of animal. In other cells you can
input information about the subject from the drop down list. Further sheets
are named that reflect the names in the drop down list

I want to be able to select a worksheet based on the subject from the drop
down list using VBA.

At the moment I can readily select one sheet such as:

Worksheet("tiger").Activate

How do I substitute "tiger" for whatever is chosen on the input worksheet
cell drop down list????

Cheerz

Wilcster


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Selecting a sheet based on a cell

Private Sub ListBox1_Click()
Worksheets(ListBox1.Value).Activate
End Sub

Mike F
"wilcster" wrote in message
...
I have an worksheet used to input data which includes a drop down list

with
subjects, lets say by way of example -types of animal. In other cells you

can
input information about the subject from the drop down list. Further

sheets
are named that reflect the names in the drop down list

I want to be able to select a worksheet based on the subject from the drop
down list using VBA.

At the moment I can readily select one sheet such as:

Worksheet("tiger").Activate

How do I substitute "tiger" for whatever is chosen on the input worksheet
cell drop down list????

Cheerz

Wilcster




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Selecting a sheet based on a cell

Why not just keep an array of sheet names and look them up in there or
just a select case statement that converts the selection to a sheet name??


wilcster wrote:
I have an worksheet used to input data which includes a drop down list with
subjects, lets say by way of example -types of animal. In other cells you can
input information about the subject from the drop down list. Further sheets
are named that reflect the names in the drop down list

I want to be able to select a worksheet based on the subject from the drop
down list using VBA.

At the moment I can readily select one sheet such as:

Worksheet("tiger").Activate

How do I substitute "tiger" for whatever is chosen on the input worksheet
cell drop down list????

Cheerz

Wilcster


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting a sheet based on a cell

Mike

Thats great - Many thanks

Wilco.

"Mike Fogleman" wrote:

Private Sub ListBox1_Click()
Worksheets(ListBox1.Value).Activate
End Sub

Mike F
"wilcster" wrote in message
...
I have an worksheet used to input data which includes a drop down list

with
subjects, lets say by way of example -types of animal. In other cells you

can
input information about the subject from the drop down list. Further

sheets
are named that reflect the names in the drop down list

I want to be able to select a worksheet based on the subject from the drop
down list using VBA.

At the moment I can readily select one sheet such as:

Worksheet("tiger").Activate

How do I substitute "tiger" for whatever is chosen on the input worksheet
cell drop down list????

Cheerz

Wilcster





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
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Selecting A Column based on Cell Value newguy Excel Discussion (Misc queries) 0 December 14th 06 09:39 PM
Selecting rows based on cell entries m.cain Excel Worksheet Functions 3 March 24th 06 04:56 PM
Selecting rows based on cell entries m.cain Excel Discussion (Misc queries) 2 March 24th 06 10:46 AM
selecting and deleting a row based on a cell value JJ Excel Programming 4 December 1st 04 05:59 PM


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