
VB or Excel VBA, accessing list of all the sheets in a workbook
Quote:
> I wonder if somebody has solved this problem. I need to access a
> list of all the sheets in an Excel 5.0 Workbook. I have no clue
> whatsoever how this will be possible. Idas are welcome to, then
> I can try them out.
In VB, I think you can use a DDE to access the sheets, but if you want to
use VBA (probably easier), you could do something like this :
Dim i as Integer ' i is always an integer isn't it?
With ActiveWorkbook ' or whichever book you like
For i = 1 To .Sheets.Count ' use .Worksheets if you only want them, Sheets
.Sheets(i).Activate ' includes Dialogs,ChartSheets and Modules
With ActiveSheet
'Do whatever sheet processing here
End With
Next i
End With
To easy eh? Try setting Application.ScreenUpdating to false before and
then true afterwards - stops that {*filter*} sheet flicking and speeds
processing up :)
scott
--
"To code or not to code, that is the question"
Scott Kinnane