Results 1 to 2 of 2

Thread: Another Procedure

Threaded View

  1. #1

    Thread Starter
    Lively Member dedub's Avatar
    Join Date
    Dec 2002
    Location
    NC
    Posts
    98

    Another Procedure

    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:
    1. Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    2. On Error GoTo handler
    3. If Button = vbRightButton Then
    4. Dim subtract As Integer
    5. subtract = InputBox("Please enter the amount you wish to subtract", "Subtract")
    6. Text1.Text = Text1.Text - subtract
    7. recalc'this is another procedure Im calling, ...disreguard
    8. End If
    9. handler:
    10. Select Case Err.Number
    11.     Case 13
    12.         MsgBox "Please enter a number"
    13. End Select
    14.  
    15. End Sub
    Last edited by dedub; Nov 2nd, 2003 at 10:04 PM.
    R.L.T.W. A+, NET+, CCNA

    Doin' my best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width