View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
yangyh[_4_] yangyh[_4_] is offline
external usenet poster
 
Posts: 1
Default Call other sub in the same module


Dear all,

I want to call other sub in the same module. Here are my codes. Can yo
help me point out the problem? Thanks.

Dim LibraryList(20) As String 'I want to use LibraryList(20) as
global array

Sub CreateLibraryArray()
Y = 0
For X = 1 To Worksheets.Count
If InStr(Sheets(X).Name, "Library") 0 Then
LibraryList(Y) = Sheet(X).Name
Y = Y + 1
End If
Next X
End Sub

Sub NewSub()
Dim List1(20) As String
CreateLibraryArray() 'Can I call CreateLibraryArray(
here?
List1(10) = LibraryList(10)
....
End Sub

Thanks.

Davi

--
yangy
-----------------------------------------------------------------------
yangyh's Profile: http://www.excelforum.com/member.php...fo&userid=2688
View this thread: http://www.excelforum.com/showthread.php?threadid=46657