Dim for Public Variables

  • Thread starter Thread starter John
  • Start date Start date
J

John

The database that I am using contains 4 public variables listed below.

Public EmuID As String
Public PMR As String
Public FirstN As String
Public LastN As String
Function GetValueFirstN()
GetValueFirstN = FirstN
End Function
Function GetValueLastN()
GetValueLastN = LastN
End Function
Function GetValuePMR()
GetValuePMR = PMR
End Function
Function GetValueEmuID()
GetValueEmuID = EmuID
End Function

Should I be using Dim statements with each vairable such as
Dim EmuID as String?

I tried this earlier, but it did not seem to work. Maybe I was doing
something wrong.

Thanks for you help
 
John said:
The database that I am using contains 4 public variables listed below.

Public EmuID As String
Public PMR As String
Public FirstN As String
Public LastN As String
Function GetValueFirstN()
GetValueFirstN = FirstN
End Function
Function GetValueLastN()
GetValueLastN = LastN
End Function
Function GetValuePMR()
GetValuePMR = PMR
End Function
Function GetValueEmuID()
GetValueEmuID = EmuID
End Function

Should I be using Dim statements with each vairable such as
Dim EmuID as String?

No.

That code is logical the way it is.

I tried this earlier, but it did not seem to work. Maybe I was doing
something wrong.

What does "did not seem to work" mean?

You should investigate when/where/how the public variables
are set.
 
Back
Top