One command button, two commands

Mahall906

New member
Local time
Today, 15:51
Joined
Apr 11, 2014
Messages
29
Still getting used to codes and would like a command button to do two things, tick a box and run a command to insert a hyperlink.

I have plenty of separate ones doing these for other things but how do I join the two in one click command?

When the "Email" button is pressed I would like it to mark checkbox "Email2" and to RunCommand acCmdInsertHyperlink for "report" text box.

Two examples of them separate are:

Private Sub Email1_Click()
Me.Email2 = True
End Sub

that sorts out the checkbox

Private Sub Email1_Click()
Me.[report].SetFocus
On Error GoTo browse_stop
RunCommand acCmdInsertHyperlink
browse_stop:
End Sub

does the hyperlink request.

Thanks in advance
 
Last edited:
Just put them together in one sub:



Private Sub Email1_Click()
Me.Email2 = True
Me.[report].SetFocus
On Error GoTo browse_stop
RunCommand acCmdInsertHyperlink
browse_stop:
End Sub
 
What on earth have been doing then!?:rolleyes: ha ha in honesty I waiting for there to be something in between the two! Thanks pbadly(y)
 

Users who are viewing this thread

Back
Top Bottom