J
Joe Cletcher
I recieve the error message "Ambiuous name detected: mID" during compilation
of the following class module. If I comment the offensive line, then the next
module level "private" statement's will return the error message. I have read
the help topic for this error and I don't seem to need any of the fixes. What
am I doing wrong?
==simple class module coding====
Option Explicit
Private mID As Long 'local copy
Private mvarName As String 'local copy
Private mvarRed As Integer 'local copy
Private mvarBlue As Integer 'local copy
Private mvarGreen As Integer 'local copy
Public Property Let mID(vdata As Long)
mID = vdata
End Property
Public Property Get ID() As Long
ID = mID
End Property
Public Property Let mvarName(vdata As String)
mvarName = vdata
End Property
Public Property Get Name() As String
Name = mvarName
End Property
Public Property Let mvarRed(vdata As Integer)
mvarRed = vdata
End Property
Public Property Get Red() As Integer
Red = mvarRed
End Property
Public Property Let mvarBlue(vdata As Integer)
mvarBlue = vdata
End Property
Public Property Get Blue() As Integer
Blue = mvarBlue
End Property
Public Property Let mvarGreen(vdata As Integer)
mvarGreen = vdata
End Property
Public Property Get Green() As Integer
Green = mvarGreen
End Property
Public Sub GetRGBColor(anID As Long)
Me.ID = anID
Me.Name = Excel.WorksheetFunction.VLookup(anID, Colors, 2)
Me.Red = Excel.WorksheetFunction.VLookup(anID, Colors, 3)
Me.Blue = Excel.WorksheetFunction.VLookup(anID, Colors, 4)
Me.Green = Excel.WorksheetFunction.VLookup(anID, Colors, 5)
End Sub
of the following class module. If I comment the offensive line, then the next
module level "private" statement's will return the error message. I have read
the help topic for this error and I don't seem to need any of the fixes. What
am I doing wrong?
==simple class module coding====
Option Explicit
Private mID As Long 'local copy
Private mvarName As String 'local copy
Private mvarRed As Integer 'local copy
Private mvarBlue As Integer 'local copy
Private mvarGreen As Integer 'local copy
Public Property Let mID(vdata As Long)
mID = vdata
End Property
Public Property Get ID() As Long
ID = mID
End Property
Public Property Let mvarName(vdata As String)
mvarName = vdata
End Property
Public Property Get Name() As String
Name = mvarName
End Property
Public Property Let mvarRed(vdata As Integer)
mvarRed = vdata
End Property
Public Property Get Red() As Integer
Red = mvarRed
End Property
Public Property Let mvarBlue(vdata As Integer)
mvarBlue = vdata
End Property
Public Property Get Blue() As Integer
Blue = mvarBlue
End Property
Public Property Let mvarGreen(vdata As Integer)
mvarGreen = vdata
End Property
Public Property Get Green() As Integer
Green = mvarGreen
End Property
Public Sub GetRGBColor(anID As Long)
Me.ID = anID
Me.Name = Excel.WorksheetFunction.VLookup(anID, Colors, 2)
Me.Red = Excel.WorksheetFunction.VLookup(anID, Colors, 3)
Me.Blue = Excel.WorksheetFunction.VLookup(anID, Colors, 4)
Me.Green = Excel.WorksheetFunction.VLookup(anID, Colors, 5)
End Sub