Not really, you have just introduced a lot more undefined code and you still
haven't given us anything about the collection class which gets defined.
Did you write this code, or borrow it from somewhere? Have you any idea what
it is/supposed to do?
--
HTH
RP
(remove nothere from the email address if mailing direct)
"medicenpringles"
<medicenpringles.1x7pyd_1129831520.7047@excelfor um-nospam.com wrote in
message news:medicenpringles.1x7pyd_1129831520.7047@excelf orum-nospam.com...
well here's where rgSandwich is:
Code:
--------------------
Private Sub Class_Initialize()
If WorksheetExists(wbSandwichAnalysis, SANDWICHES_WORKSHEET) Then
Set wsSandwiches = wbSandwichAnalysis.Worksheets(SANDWICHES_WORKSHEET )
Else
Set wsSandwiches = Nothing
Err.Raise vbObjectError + 200, "Sandwich Class", "The worksheet named "
& SANDWICHES_WORKSHEET & " could not be located."
End If
End Sub
--------------------
and here's name and size:
Code:
--------------------
Property Let Name(NameString As String)
If rgSandwich Is Nothing Then
Name = ""
Else
rgSandwich.Offset(0, NAME_OFFSET).Value = NameString
End If
End Property
Property Get Name() As String
If rgSandwich Is Nothing Then
UninitializedError
Else
Name = rgSandwich.Offset(0, NAME_OFFSET).Value
End If
End Property
Property Let Size(SizeString As String)
If rgSandwich Is Nothing Then
Size = ""
Else
Select Case SizeString
Case "Small"
rgSandwich.Offset(0, SIZE_OFFSET).Value = SizeString
Case "Regular"
rgSandwich.Offset(0, SIZE_OFFSET).Value = SizeString
Case "Large"
rgSandwich.Offset(0, SIZE_OFFSET).Value = SizeString
Case "Flat Bread"
rgSandwich.Offset(0, SIZE_OFFSET).Value = SizeString
Case Else
Err.Raise vbObjectError + 514, "Sandwich Class", "Size not valid. " & _
"Either choose from valid sizes or create new size."
End Select
End If
End Property
Property Get Size() As String
If rgSandwich Is Nothing Then
UninitializedError
Else
Size = rgSandwich.Offset(0, SIZE_OFFSET)
End If
End Property
--------------------
that help any?
--
medicenpringles
------------------------------------------------------------------------
medicenpringles's Profile:
http://www.excelforum.com/member.php...o&userid=16458
View this thread: http://www.excelforum.com/showthread...hreadid=477929