Can an Event and Event content be assigned programmatically?

  • Thread starter Thread starter Kan D.
  • Start date Start date
K

Kan D.

Can an event AND event content be assigned prorammatically to a control?

See below example's ".OnClick" line...

Dim c_imgStatus As Image

With c_imgStatus
.Name = "imgStatus" & i
.Picture = "\\path\path\Status Button.jpg"
.HyperlinkSubAddress = "Form FormName"
.OnClick = "MyVariable = " my_OtherVariable & Chr(13) & _
"msgBox MyVariable"
End With

So when I click on the button, I want the click to execute the button's "On
Click" event that I'm trying to programmtically assign...

Thank you for your help,

Kan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top