Results 1 to 6 of 6

Thread: Assigning constants as variables in arrays

  1. #1

    Thread Starter
    Lively Member nickTHEguitarist's Avatar
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    82

    Question Assigning constants as variables in arrays

    I need to make a 2d array with the variable strStudents (it is for a class the project is a grading program) and I need to have it strStudent(Val(strStdAmt), 1000) for the array. Why can't I do this and how can I do this?
    Last edited by nickTHEguitarist; Apr 14th, 2005 at 07:19 PM.
    Nick

  2. #2

  3. #3

    Thread Starter
    Lively Member nickTHEguitarist's Avatar
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    82

    Re: Assigning constants as variables in arrays

    alright thanks.
    Nick

  4. #4

    Thread Starter
    Lively Member nickTHEguitarist's Avatar
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    82

    Re: (solved) Assigning constants as variables in arrays

    that doesn't seem to work under general declarations it says invalid outside procedure
    Nick

  5. #5

  6. #6
    Old Member moeur's Avatar
    Join Date
    Nov 2004
    Location
    Wait'n for Free Stuff
    Posts
    2,712

    Re: Assigning constants as variables in arrays

    [Highlight=VB]Option Explicit
    Dim strStudent() As String

    Private Sub Form_Load()
    Dim strStdAmt As Long
    strStdAmt = 1000
    ReDim test(strStdAmt, 1000)

    End Sub[/VBCDOE]

    EDIT: I'm too slow

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