Seeing how you guys are WAY better than me at Procedures could you help me on this one. I have to execute this code in 5 different text boxes. How could I write a call to simplify everthing. The only thing different for each one is the text changes from text1.text to text2.text...ect. In other words, I know how to create the procedure to call this code, what I dont know how to do is change where the text1.text changes to text2.text ie... I cant call this code from Text2_MouseDown(.......
VB Code:
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) On Error GoTo handler If Button = vbRightButton Then Dim subtract As Integer subtract = InputBox("Please enter the amount you wish to subtract", "Subtract") Text1.Text = Text1.Text - subtract recalc'this is another procedure Im calling, ...disreguard End If handler: Select Case Err.Number Case 13 MsgBox "Please enter a number" End Select End Sub




Reply With Quote