Returns the Bot object nearest to the mouse location when the observer clicks on the Screen display.
Private Sub object_BotOnClick(Bot As Bot)
object A reference to a World control object sited on a Worksheet.
Bot Required Bot. Returns a reference to a Bot object.
The MouseEvents property must be set to True for this event to be enabled.
The following example uses the BotOnClick to change the color of a Bot.
Private Sub World1_BotOnClick(ByVal Bot As Bot)
If Bot.Color = vbtYellow Then
Bot.Color = vbtBlue
Else
Bot.Color = vbtYellow
End If
End Sub