i have defined 3 varibale in Global section of my project
'************ Global **********
Public ProjectPath As New Collection
Public PInterval As New Collection
Public PrjFinish As New Collection
'************ End of Global **********
in Other form of my project named FrmMain , i have tried to fill these collection
like these
Public Sub CreateNodes()
ProjectPath.Add Item:=varCompPath, Key:=rst("PrjId"),
PrjFinish.Add Item:=rst("PrjFinish"), Key:=rst("PrjId")
PInterval.Add Item:=varInterval, Key:=rst("PrjId")
end sub
now as these variable are Global I want to use them in other procedure in that form like this
If PrjFinish.Item(i) > 0 Then
PrjPath = ProjectPath.Item(i)
If fs.FileExists(PrjPath) Then
msgbox "Do something"
End If
End If
The problem is that ProjectPath and PInterval can work fine as a Global variable but PrjFinish Gives a Automation Error and nothing else
can anybody help me?
'************ Global **********
Public ProjectPath As New Collection
Public PInterval As New Collection
Public PrjFinish As New Collection
'************ End of Global **********
in Other form of my project named FrmMain , i have tried to fill these collection
like these
Public Sub CreateNodes()
ProjectPath.Add Item:=varCompPath, Key:=rst("PrjId"),
PrjFinish.Add Item:=rst("PrjFinish"), Key:=rst("PrjId")
PInterval.Add Item:=varInterval, Key:=rst("PrjId")
end sub
now as these variable are Global I want to use them in other procedure in that form like this
If PrjFinish.Item(i) > 0 Then
PrjPath = ProjectPath.Item(i)
If fs.FileExists(PrjPath) Then
msgbox "Do something"
End If
End If
The problem is that ProjectPath and PInterval can work fine as a Global variable but PrjFinish Gives a Automation Error and nothing else
can anybody help me?