Hi all, I want to create an array in VBA such that typical end-users
can modify what goes into the array without knowing code (or looking
at it). Hence, I want the array to read the contents of a worksheet,
excluding the first column and first row (which are labels).

i.e., I want to read the following into the array, but not including
the first row or the first column
# ;     Tab (0) ;       Code (1);       Chart (2)
0 ;     Tab1 ;  A ;     "A Chart"
1 ;     Tab2 ;  P ;     "P Chart"

and the # of rows and columns may increase, as we get more
categories.

How can I accomplish this?

I've tried the following, but run into errors:

Sheets("My Sheet").Select
Dim y As Variant
Dim x As Variant
y = xlLastRow
x = xlLastCol
Dim ClaimProvider() As Variant
ClaimProvider = Range(Cells(2, 2), Cells(y, x))

This isn't working, and gives me errors. (xlLastRow and xlLastCol are
custom functions that find the last row and last column on a worksheet)

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to