Hi,
I have three modules- A,B,C with the following code as seen below. When I try to run sub Main it crashes when it tries to call ReadData without any error messages even if I use On Error GoTo.... If I remove pix in the global definition it does not crash in ReadData on that line. But it still crashes on line with "sh(1)="name 1". What is wrong here? I need to use the variables in a lot of subroutines therefore I use Global.

Module A
Global sh(1 to 10) as string
Global pix as integer
Module B
Sub ReadData
pix=1
sh(1)="name 1"
sh(2)="name 2"
End sub
Module C
Sub Main
Call ReadData
End sub