I have a class module - MyDataFileObject - a simple custom database class that works with sequential access files, and holds the data for my project (a simple Car purchasing wizard for my programming class).
Nearly all the data stored in this class is used in every form in my project; instead of using copy and paste, I decided to design a class module (beyond the scope of my Intro to Programming text).
So, I'm encapsulating this data (6 arrays). The arrays are Dim'ed inside the module, and I use public methods to access the data contained.
Public Function getMake(nMake As Integer) As String
getMake = astrMakes(nMake)
Public Function getModel(nMake As Integer, _
nModel As Integer) As String
getModel = astrModels(nMake, nModel)
-Both of these work great.
Public Sub setMake(ByVal nMake As Integer, _
ByVal strMake As String)
astrMakes(nMake) = strMake
Public Sub setModel(ByVal nMake As Integer, _
ByVal nModel As Integer, _
ByVal strModel As String)
astrModels(nMake, nModel) = strModel
-When I create a New DataFileObject and attempt to access these methods, it gives me a "Compile Error: Expected: = "; which makes precious little sense.
For 37 points (Half of what I got) : Can someone please tell me exactly which flaming loop VB expects me to do a reverse back flip through to accomplish this. Thanks. Gaping bullet hole -> *;p