Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have 10 rows of a combobox and 2 text boxes on form1 On each row the combobox is called AccA , DebA, CrdA next row is AccB , DebB, CrdB....... I'm trying to write a small bit of code that checks if either DebA or CrdA < null or blank then there must be a value in AccA. Else display msbox "Error". Now check the next line. I've tried this to no avail. Public myletter as string Private Sub but_post_Click() If form1.Balance < 0 Then MsgBox "Please ensure that the journal balances to zero before posting" End Else 'Now this is where I start getting errors myletter = "A" test_acc_incl myletter = "B" test_acc_incl End If End Sub Sub test_acc_incl() Dim Debletter As Object Dim Crdletter As Object Dim Accletter As Object ' I tried using the 3 dims as string and variables but that didn't work Deb = "form1.Deb" & myletter Crd = "form1.Crd" & myletter Acc = "form1.Acc" & myletter Set Debletter = Deb Set Crdletter = Crd Set Accletter = Acc If Debletter < Null Or Crdletter < Null Then If Accletter = Null Then MsgBox "Error" Else End If Else End If End Sub Please help, Thanks, marc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form Text Boxes - Copy format of text boxes | Excel Discussion (Misc queries) | |||
VBA for form check boxes | Excel Worksheet Functions | |||
Arrays/Functions/Different datatypes in a formula? | Excel Worksheet Functions | |||
combo boxes on a form | Excel Discussion (Misc queries) | |||
textboxes and datatypes | Excel Programming |