|
-
Jun 4th, 2006, 01:04 PM
#1
Thread Starter
Member
Call VBA Code From Right Click Menu:
Greetings:
Currently the following code is set to be called via a DblClick on a list box item; is it possible to perform this function by right clicking the item in the list box and selecting a command rather than DblClicking it?
Thanks
Mshelley
Private Sub List0_DblClick(Cancel As Integer)
On Error Resume Next
'Click Sound
PlaySound "H:\Generald\media\start.wav", ByVal 0&, SND_FILENAME Or SND_ASYNC
'Set Value for Unit, Agency and Duty Officers
Unit.Value = List0.Column(1)
AGENCY.Value = List0.Column(3)
dutyofficers.Value = List0.Column(4)
'Set date values
Month = Format(Now(), "mm")
Day = Format(Now(), "dd")
Year = Format(Now(), "yyyy")
Dispatched.Value = TIME()
If IsNull(Received) Then
Received.Value = TIME()
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|