Results 1 to 3 of 3

Thread: How to declare an array/range with variable with Excel

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2002
    Posts
    2

    Question How to declare an array/range with variable with Excel

    I'm making a grade book program using excel, so the number of students change as well as assignments and I don't know how to get VB to accept arrays or ranges that are declared with variables

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    here's a tutorial project show how to create / read from / write to excel using VB
    Attached Files Attached Files

  3. #3
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    Omaha, NE
    Posts
    270
    I assume your spreadsheet contains the student names and assignment/test grades. Also, if you are a teacher, you probably have more than one class. It would help to know how your Excel file is structured. If it were me, I'd have a separate sheet for each class, student names down the rows, assignments across the columns like a regular grade book (although transposing the names/assignments wouldn't be a problem).

    Either way, you could use dynamic arrays to read/write to the Sheet. If you can provide additional information as to what you'd like to do, I can give you some sample code.

    Nate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width