Disclaimer: I have a bit of experience with PHP, Java and VBA but I am mainly a front end developer so Javascript is more my thing.
I am trying to create some classes which implement an Interface in an MS Access Database and I can't even get the concept to work.
What I have:
IFeed Class (the interface)
Option Explicit
Public Name As String
Public Property Get Name() As String
End Property
Public Property Let Name(ByVal vNewValue As String)
End Property
CFeed Class
Option Explicit
Implements IFeed
Private Name As String
Private Property Let IFeed_Name(ByVal newName As String)
Name = newName
End Property
Private Property Get IFeed_Name() As String
IFeed_Name = Name
End Property
Test module
Public Sub testFeedClass()
Dim test As CFeed
Set test = New CFeed
test.Name = "New Feed" ' Doesn't work
Debug.Print test.Name
End Sub
I have spend almost a day changing private to public, public to private and loads of other things but I just can't get it to work. Can someone please point out where I am going wrong? I am sure it is something simple.