February 15, 2019
Hot Topics:

Communicating over a Network

  • November 20, 2002
  • By Sam Huggill
  • Send Email »
  • More Articles »

The best way to handle errors is to use events.

In Visual Basic, you can create your own events. An example event might be when you click on a button:

Private Sub Command1_Click()

You call or 'raise' events using the RaiseEvent method. This method accepts one parameter, which is one of the events declared. You declare an event like this:

Public Event TextSent(TextContent As String)

The event procedure for this event will look like this:

Private Sub MyModule_TextSent(TextContent As String)

Page 6 of 7

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date