LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default Global array declare

I need a global array to access from my VBA code.

I have following code on thisworkbook declaration areare
Dim GradeSheet(1 To 7) As String

To initilize it in Workbook_open

Private Sub Workbook_Open()
GradeSheet(1) = "GRADE"
GradeSheet(2) = "EXAM"
GradeSheet(3) = "HOME WORK"
GradeSheet(4) = "READING"
GradeSheet(5) = "SPEAKING"
GradeSheet(6) = "COMPOSITION"
GradeSheet(7) = "PROJECT"
End Sub

in my spreadsheet have following code


dim i, istudent as integer
For i = 2 To 7
Call COPY_STUDENT_INFO_DETAILS(GradeSheet(i), iStudent)
Next i


I got compiled error "sub or function not defined
It seems VBA considers GradeSheet as a function or sub not an array.

Where I did wrong here?
Any information is great appreciated,


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Declare Variables in Array Mike H. Excel Discussion (Misc queries) 2 March 11th 09 12:33 PM
How to declare a dynamic array Peter Rooney Excel Discussion (Misc queries) 4 April 13th 05 01:25 PM
Declare an Array() ???? Andoni[_23_] Excel Programming 1 August 31st 04 07:12 PM
How to declare Multi-dimensional dynamic array? Terence Excel Programming 1 August 11th 03 04:55 AM
declare a two dimenssion array Tom Ogilvy Excel Programming 0 July 8th 03 03:06 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"