Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I only write VBA once in a blue moon and so I am probably asking the obvious
I want to use a list of sheetnames (that will grow over time) held in the "companies" sheet ,cells b1 to b?? to pass control to a routine that selects each sheet in turn, carries out some code and then selects the next sheet... Obviously I can do this using a routine to find the row of the last name in column B and then a LOOP Sub WSheetSelectL( ' selects each sheet name down the list & activates that shee Sheets("companies").Selec Range("b1").Offset(1, 0).Selec Do While Not IsEmpty(ActiveCell Nrow = (ActiveCell.Row Sname$ = Cells(Nrow, 2 ' passes the sheet name to a routine that executes more code on the named shee Sheets("companies").Selec ActiveCell.Offset(1, 0).Selec Loo End Sub However, I am sure that I could use an array and be a lot neater/efficient. Trying this has brought me to the limit of my knowledge, I can populate the array from the cells, but can I use it? Can I h**l CAN ANYONE SUGGEST A WAY |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating a Drop Down List with Step by Step Instructions for 2007 | Excel Worksheet Functions | |||
Need step by step to add invoice numbering to excel template | New Users to Excel | |||
Can anyone povide step by step instructions on how to do the follo | Excel Discussion (Misc queries) | |||
What is the step-by-step procedure for making a data list? | Excel Discussion (Misc queries) | |||
I need step by step instructions to create a macro for 10 imbedde. | Excel Worksheet Functions |