Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50079

Get Cell Value From Sheet In Sheet Array

$
0
0
Hi all,

Using Excel 2013 64-bit
As I am looping and loading a sheet array I could like to get a cell value from one of the sheets to use as the filename when I export to pdf

I tried
Code:

Sheets(avSheetsExport(1)).Select
sFileName = ActiveSheet.Range("A1")

I confirmed the LBound and UBound of the array are 1 and 3 respectively
Code:

Debug.Print LBound(avSheetsExport)
Debug.Print UBound(avSheetsExport)

The error I receive
Quote:

Run-time error 9 - Subscript out of range
What else can I check?

thanks
w

Viewing all articles
Browse latest Browse all 50079

Trending Articles