View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
marty6[_5_] marty6[_5_] is offline
external usenet poster
 
Posts: 1
Default Need help with userform....please....

Hi Bob,

I have started over and I think that I am close:


I went back to two columns, Column A and Column B. The new excel boo
is called "book31" respectively.

In excel, Column A and b look like this:

Column A Column B
1001.01 10
1001.02 15
1001.03 20
1001.04 06

Here's the userform formula:

Private Sub CommandButton1_Click()
IncDec (txt1Add), True
IncDec (txt1Subtract), False

IncDec (txt2Add), True
IncDec (txt2Subtract), False

End Sub
Private Sub IncDec(textbox As msforms.textbox, Increment As Boolean)
Dim iItem As Long


iItem = Evaluate("Match(" & TextBox1.Text & ", A1:A4, 0)")
If iItem 0 Then
With Worksheets("book31")
If Increment Then
Cells(iItem, "B").Value = Cells(iItem, "B").Value + 1
Else
Cells(iItem, "B").Value = Cells(iItem, "B").Value - 1
End If
End With
End If

End Sub

Private Sub CommandButton2_Click()
End
End Sub



ok, here's the issue. I had to add () marks around the txt1Add an
txt1Subtract to make the compile error: byref argument type mismatch g
away. Now, I after adding the () marks, I receive the following erro
message: Run time error '424' object required.
After debugging, the highlighted yellow line is the first line in th
programming: IncDec (txt1Add), True

Your thoughts needed.....

Thank you,

marty6


--
Message posted from http://www.ExcelForum.com