#1
|
|||
|
|||
Run procedure when a form is opened
I am sure this must be simple, but how do I run a vba subroutine automatically when a form is opened. Can't seem to figure this out. Is there something like a Form_Open() event that is called when the form opens? |
#2
|
||||
|
||||
Are you talking about a VBA userform?
If so you can use UserForm_Initialize as the macro. This link might be useful for you... Initialize an Excel VBA User Form
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Andrew - yes thanks that worked - I knew it must be simple.
Funny thing is, I could not see any events available in the codes right hand drop down list - just the word (Declarations). When I created the UserForm_Initialize event manually suddenly there were a whole load of other events available such as Activate, AddControl etc. Had I been able to see this list when the form was first created without any code, it would have been obvious. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MAPItoMIMEStm procedure of IConverterSession instance | free@ranger | Outlook | 0 | 01-20-2020 10:29 AM |
Can't finish update procedure | yosbeck | Office | 1 | 04-21-2017 04:27 AM |
Run Macro anytime new mail message form is opened | starrouter | Outlook | 1 | 02-24-2013 11:29 AM |
excel where is procedure being called from | davids67 | Excel Programming | 1 | 11-18-2011 06:48 AM |
Document selection procedure | kennethc | Word | 0 | 09-15-2010 02:56 PM |