G
Guest
How do I declare a variable that will be used by more than one procedure?
I have done the following:
-----------------------------------------------
Option Compare Database
Option Explicit
Dim varStartDate As Date ‘ My variables
Dim varEndDate As Date ‘
Private Sub cmdCancel_Click()
…
End Sub
Private Sub
…
End Sub
-------------------------------------------------
But I see some people do this:
------------------------------------------------
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
I have done the following:
-----------------------------------------------
Option Compare Database
Option Explicit
Dim varStartDate As Date ‘ My variables
Dim varEndDate As Date ‘
Private Sub cmdCancel_Click()
…
End Sub
Private Sub
…
End Sub
-------------------------------------------------
But I see some people do this:
------------------------------------------------
Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type