Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check what button opened a form

Status
Not open for further replies.
On the Click_Event() send a msg to a TextFile/ MsgBox/TextBox whatever. Just a simple example:
Code:
Private Sub Command1_Click()

    ' write to msgbox
    msgBox "You clicked CommandButton 1"

    ' write to textbox
    Text1.Text = "You clicked Command 1 & vbCrlf
    Text1.Text = ""

    '  write to textfile
    Open "C:\Test.txt" For Output As #1
    Write #1, You clicked command1 & vbCrlf
    Close #1
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top