ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Array Range (https://www.excelbanter.com/excel-programming/420806-array-range.html)

Art

Array Range
 
Hello all:

I want to use a range with multiple sheets, and multiple ranges. It should
look like this:

AR = sheets(Array("Sheets1", "Sheets2", "Sheets3", "Sheets4", "Sheets5", _
"Sheets6", "Sheets7"))
..Range("A2:A208,C2:C208,E2:E208,G2:G208,I2:I208,K 2:K208,M2:M208,O2:O208,Q2:Q208,S2:S208")


But there is an error. Can someone please clear this out.

Thanks

Art

Mike Fogleman[_2_]

Array Range
 
VBA can only access one worksheet at a time. You would need to loop thru
each sheet to access the range on that sheet.

Mike F
"art" wrote in message
...
Hello all:

I want to use a range with multiple sheets, and multiple ranges. It should
look like this:

AR = sheets(Array("Sheets1", "Sheets2", "Sheets3", "Sheets4", "Sheets5", _
"Sheets6", "Sheets7"))
.Range("A2:A208,C2:C208,E2:E208,G2:G208,I2:I208,K2 :K208,M2:M208,O2:O208,Q2:Q208,S2:S208")


But there is an error. Can someone please clear this out.

Thanks

Art





All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com