View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
marksince1984[_8_] marksince1984[_8_] is offline
external usenet poster
 
Posts: 1
Default using variables to reference sheets


The vba code is only run once everytime the spreadsheet is opened.

The user is prompted for a choice (radio buttons), and that choice then
dictates the values assigned to the variable.

The code then creates sheets and names them after the variable (only if
the variables have been changed from their default values, this leaves
room for different choices having different numbers of worksheets

The code the progresses to place a pivot on each sheet filtered by that
variable


Example of process:

Choices
a) "4 leg animals" radio button will set variables 1,2,3... to
"Dog","Cat","horse"
b) "2 leg animals" radio button will set variables 1,2,3.. to
"Human","Bird"
c) "3 leg animals" radio button will set variables 1,2,3.. to "Dog with
3 legs"

If user chooses a), tabs "Dog","Cat","horse" will be created (I can do
this)
I then need to create pivot tables on each sheet filtered by the same
variable as created the name of that sheet (see code in orgininal
text)

I would appreciate a good hit around the back of the head to explain
what the proper way to use these variables is.

Am i getting my idea across?? I understand that what the writer often
considers simple is complex to the reader.


--
marksince1984
------------------------------------------------------------------------
marksince1984's Profile: http://www.excelforum.com/member.php...o&userid=33484
View this thread: http://www.excelforum.com/showthread...hreadid=551223