Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    3

    Unanswered: how do I write code to an event when creating a control?

    I am creating about 80 controls on a form using the CreateControl method.

    Is there a way that I can also create some code for the 'OnClick' event at the same time?

    Thanks
    Red

  2. #2
    Join Date
    Dec 2005
    Posts
    45
    This works to attach the subroutine "Test" to the onclick event of a form:

    Forms("Form1").Controls("Command1").OnClick = "=Test()"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •