Hi,
Am a newbie to VBA for excel, have left the spreadsheet's commands to come over to the "dark side"
I've created a program that uses 8 subroutines to complete my task. The 1st sub calls the rest in order. In sub 4() I Dim an array, find 2 index values and use those to Redim the array - TaskCount(Countmax,Taskmax).
For the most part it all works. Then I decided to clean up the program and instead of duplicating the creation and finding of values for TaskCount in sub 6() and sub 7(), I thought I would reuse the arrays values.
For my trouble all I get is an array of values being zero or "Subscript out of range" Runtime error 9 message. I tried using PUBLIC and STATIC declarations, but to no avail. So I searched the "Helps" and the net and can not find any definitive information of how to reuse an array in more than one procedure inside a module.
Thanks for any help °°°Panasonic Hi&Lo Def WebPage°°°
Am a newbie to VBA for excel, have left the spreadsheet's commands to come over to the "dark side"
I've created a program that uses 8 subroutines to complete my task. The 1st sub calls the rest in order. In sub 4() I Dim an array, find 2 index values and use those to Redim the array - TaskCount(Countmax,Taskmax).
For the most part it all works. Then I decided to clean up the program and instead of duplicating the creation and finding of values for TaskCount in sub 6() and sub 7(), I thought I would reuse the arrays values.
For my trouble all I get is an array of values being zero or "Subscript out of range" Runtime error 9 message. I tried using PUBLIC and STATIC declarations, but to no avail. So I searched the "Helps" and the net and can not find any definitive information of how to reuse an array in more than one procedure inside a module.
Thanks for any help °°°Panasonic Hi&Lo Def WebPage°°°