Results 1 to 11 of 11

Global Array not working

Threaded View

Pergo Global Array not working 08-30-2012, 09:05 AM
shg Re: Global Array not working 08-30-2012, 09:09 AM
JosephP Re: Global Array not working 08-30-2012, 09:24 AM
Pergo Re: Global Array not working 08-30-2012, 09:40 AM
JosephP Re: Global Array not working 08-30-2012, 09:43 AM
shg Re: Global Array not working 08-30-2012, 09:49 AM
Pergo Re: Global Array not working 08-30-2012, 09:51 AM
shg Re: Global Array not working 08-30-2012, 09:54 AM
JosephP Re: Global Array not working 08-30-2012, 10:02 AM
shg Re: Global Array not working 08-30-2012, 10:03 AM
Pergo Re: Global Array not working 08-30-2012, 10:25 AM
  1. #1
    Registered User
    Join Date
    11-20-2010
    Location
    Delaware, USA
    MS-Off Ver
    Excel 2003
    Posts
    73

    Global Array not working

    Good Morning,

    I've been putting together a UserForm that utilizes an array in 2 different subs. I want to build the array in 1 sub and then reference it in another. I'm getting:


    Compile Error:
    Sub or Function not defined


    I believe I declared the array corrected as public in the "Workbook_Open" section.

    Private Sub Workbook_Open()
    
    Public jobindex As Integer
    Public Max As Integer
    Max = 15
    Public jobdisplay(1 To Max) As String
    Then in my userform I get:

    For jobindex = 1 To Max
    ...
    jobdisplay(jobindex) = "Rates for " & job & vbCrLf & outlet(1) & outlet(2) & outlet(3) & outlet(4) & outlet(5) & outlet(6) & outlet(7) & outlet(8) & vbCrLf & notes
    Any advice? I'm at a dead end!

    John
    Last edited by Pergo; 08-30-2012 at 11:27 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1