View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Using a variabel to make an array?


"SkatKat " wrote in message
...
prt1 = Mid(prt1, 3, Len(prt1))
prt2 = Mid(prt1, 2, Len(prt1) - 2)


What is this supposed to do.


'Worksheets("ark3").Range("A1") = prt
'"O-002F","O-003F"
Sheets(Array("O-002F", "O-003F")).Select 'this one works
Sheets(Array((prt1))).Select 'this one doesnt work


Assuming you cut out those two lines above, this will work

Sheets(Array(SPlit(prt1,"&"))).Select

Sheets(Array(("&prt2"))).Select 'this one doesnt work


No chance, none of the worksheet start with &.