simulate actual clicking in VBA Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text box and it has some code on the on_click event. What I need to
do is, after tose code are executed, I would like to automatically click on a
label. There is no code in the on-click event of the label, but it has a
hyperlink, so it opens a file.
Shortly, I would like the code to execute whatever is in the 0n_click event
of the textbox and, without asking the user to click on the label with the
hyperlink, Code will automatically open that hyperlink...

Does anyone have any idea...

thanks
 
To follow the hyperlink address in a label named Label1, try:
Application.FollowHyperlink Me.Label1.HyperlinkAddress

If you also need to execute the code in the On Click event procedure of a
command button named cmd1, try:
Call cmd1_Click()
 
Back
Top