blairintern
New Member
- Joined
- Jul 16, 2007
- Messages
- 21
I am receiving a "Object Type Mismatch Error" with my variable CallPrice, an element of the user-defined class IssueClass.
Do
With Sheets("Input").Range("A1")
If .Offset(i, 0) Is Nothing Then
i = i + 1
Else
Set Bonds = New IssueClass
Bonds.Purpose = .Offset(i, 2) & " " & .Offset(i, 4) _
& " " & .Offset(i, 5)
Bonds.DatedDate = .Offset(i, 0)
Bonds.Series = .Offset(i, 3)
Bonds.Par = .Offset(i, 7)
Bonds.CallDate = .Offset(i, 8)
Bonds.CallPrice = .Offset(i, 9) HERE
Bonds.Fitch = .Offset(i, 10)
Bonds.Moody = .Offset(i, 11)
Bonds.SandP = .Offset(i, 12)
Bonds.Underwriter = .Offset(i, 16)
Bonds.Counsel = .Offset(i, 17)
' Bonds.Refunded = .Offset(i, 19)
' Bonds.Insurance = .Offset(i, 26) ' not yet on form
Set AllIssues = Bonds
n = n + 1
i = i + 1
End If
End With
Loop Until ActiveCell.Range("A1").Offset(i, 0).Value = "Session Det"
The CallPrice code is as follows:
Private pCallDate As String
Private pCallPrice As Integer
Private pCallInfo As String
Property Let CallDate(D As String)
pCallDate = D
End Property
Property Let CallPrice(p As Integer)
If p <> "" Then
pCallPrice = p
End If
End Property
Sub CreateCall()
pCallDate = Format("mm/dd/yy")
pCallInfo = pCallDate & " @ " & pCallPrice
End Sub
Do
With Sheets("Input").Range("A1")
If .Offset(i, 0) Is Nothing Then
i = i + 1
Else
Set Bonds = New IssueClass
Bonds.Purpose = .Offset(i, 2) & " " & .Offset(i, 4) _
& " " & .Offset(i, 5)
Bonds.DatedDate = .Offset(i, 0)
Bonds.Series = .Offset(i, 3)
Bonds.Par = .Offset(i, 7)
Bonds.CallDate = .Offset(i, 8)
Bonds.CallPrice = .Offset(i, 9) HERE
Bonds.Fitch = .Offset(i, 10)
Bonds.Moody = .Offset(i, 11)
Bonds.SandP = .Offset(i, 12)
Bonds.Underwriter = .Offset(i, 16)
Bonds.Counsel = .Offset(i, 17)
' Bonds.Refunded = .Offset(i, 19)
' Bonds.Insurance = .Offset(i, 26) ' not yet on form
Set AllIssues = Bonds
n = n + 1
i = i + 1
End If
End With
Loop Until ActiveCell.Range("A1").Offset(i, 0).Value = "Session Det"
The CallPrice code is as follows:
Private pCallDate As String
Private pCallPrice As Integer
Private pCallInfo As String
Property Let CallDate(D As String)
pCallDate = D
End Property
Property Let CallPrice(p As Integer)
If p <> "" Then
pCallPrice = p
End If
End Property
Sub CreateCall()
pCallDate = Format("mm/dd/yy")
pCallInfo = pCallDate & " @ " & pCallPrice
End Sub