PanzerRanger
New Member
- Joined
- Jan 3, 2018
- Messages
- 20
I have a form that gets data from a class but somehow when the nested sub that reads the data to the form gets terminated premature
Code:
Private BA As BidApproval
Private Sub UserForm_Initialize()
Set BA = New BidApproval
For Each c In Me.Controls
If TypeName(c) = "ComboBox" Then
c.AddItem "JA"
c.AddItem "NEJ"
c.Value = "NEJ"
End If
Next c
On Error Resume Next
Call ReadData ' Code that asigns data to the form
Call ReadSignature
Call LockDown
End Sub
Private Sub ReadData()
Me.TextBox_Customer = BA.Customer
Me.TextBox_Description = BA.Description
Me.TextBox_Notes = BA.Notes
If Not BA.Bid = "" Then Me.ComboBox_Bid = BA.Bid
If Not BA.Calculation = "" Then Me.ComboBox_Calculation = BA.Calculation
If Not BA.Materialspecification = "" Then Me.ComboBox_Materials = BA.Materialspecification
If Not BA.Specification = "" Then Me.ComboBox_Specification = BA.Specification
If Not BA.Timeplan = "" Then Me.ComboBox_Timeplan = BA.Timeplan
If Not BA.ContractorAvailible = "" Then Me.ComboBox_Contractor = BA.ContractorAvailible
If Not BA.PreDesign = "" Then Me.ComboBox_Predesigned = BA.PreDesign
If Not BA.TechnicanTime = "" Then Me.TextBox_TimeTechnican.Value = BA.TechnicanTime ' This property terminats the sub
If Not BA.ClerkTime = "" Then Me.TextBox_TimeClerk = BA.ClerkTime
If Not BA.BidSum = "" Then Me.TextBox_BidTotal = BA.BidSum
If Not BA.ContractorSum = "" Then Me.TextBox_ContractorTotal = BA.ContractorSum
End Sub
Public Property Let TechnicanTime(Val As Long) ' Class Property
With Form
.Range("A22") = Val
End With
End Property
Public Property Get TechnicanTime() As Long ' Class Property
With Form
TechnicanTime = .Range("A22")
End With
End Property ' When I step out from here it terminates the sub Readdata despite more values are suppose to be read. The format of the A22 is number
Last edited by a moderator: