Thread: Page Selection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Page Selection

Ron,

It's a little tricky.
The Split function returns an array, however
it is not available in Excel 97.
'-----------------------
Sub TestSelection()
Dim strNames As Variant
strNames = Range("Sourceprint").Value
strNames = Split(strNames, ",", -1, vbTextCompare)
Sheets(strNames).Select
End Sub
'---------------------

Jim Cone
San Francisco, USA


"Sagaron" wrote in
message ...
Hi
I would like the result in a cell to select the array of sheets. For
eg, if cell A1 on sheet1 = "sheet1","sheet2","sheet3", I would like all
3 sheets to be selected. So far I have tried:
Sheets(Array(Sourceprint).Select

with Sourceprint being the name defined for that cell (in this case A1
on sheet1) which gives a error
thanks
Ron