+ Reply to Thread
Results 1 to 2 of 2

sub executed as the form loads

  1. #1
    snaggy^^
    Guest

    sub executed as the form loads

    It's quite a stupid question...
    how do i get to run a sub as the form loads?

    smth like

    sub myform_initialize()
    or
    sub myform_load()

    but it doesn't work...

  2. #2
    Tom Ogilvy
    Guest

    Re: sub executed as the form loads

    The initialize event is always named

    Private Sub Userform_Initialize()

    and you can use that to run your code. It is always best to enter event
    declarations by selecting them from the dropdowns at the top of the module.
    Then you wouldn't have tried to use a name like myfornm_initialize().
    There is no Load event - that is what initialize is.


    There is an Activate event.
    --
    Regards,
    Tom Ogilvy

    "snaggy^^" <snaggy@discussions.microsoft.com> wrote in message
    news:DA36C2AD-C553-42BF-B61B-1C849AB7558C@microsoft.com...
    > It's quite a stupid question...
    > how do i get to run a sub as the form loads?
    >
    > smth like
    >
    > sub myform_initialize()
    > or
    > sub myform_load()
    >
    > but it doesn't work...




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1