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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run a doubleclick event from a seperate macro

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi, i have a form, with 2 subs in it, the first is a double click event, the second i want to run the doubleclick event, jus for ease of use. how do i do this i tried:

sub cmdAdd()
Application.Run "workbook.xls!frmPriceList.lstItems_DblClick"
end sub

but it didnt work
any help
 
If the dbl_click event triggers an event procedure, that is nothing more than a subroutine, so you may call it as such.

I think that I switched up the order of which should call which, but this should give you an idea of what you may be trying to do


Private Sub Command1_Click()
MsgBox Me.Label0.Caption
End Sub

Private Sub Label0_DblClick(Cancel As Integer)
Call Command1_Click
End Sub


The result of this is that if you double click the lable, or if you click the command button the same actions are ultimately executed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top