Results 1 to 3 of 3

UserForm Initialize and Activate

This is a discussion on UserForm Initialize and Activate within the Excel Questions forums, part of the Question Forums category; Is there any difference between: Code: Private Sub UserForm_Activate() End Sub and Code: Private Sub UserForm_Initialize() End Sub ? They ...

  1. #1
    Board Regular AD_Taylor's Avatar
    Join Date
    May 2011
    Posts
    687

    Default UserForm Initialize and Activate

    Is there any difference between:

    Code:
    Private Sub UserForm_Activate()
    
    End Sub
    and

    Code:
    Private Sub UserForm_Initialize()
    
    End Sub
    ?

    They both seem to do the same thing as far as I can tell?
    Just wondering as I have a file with multiple UserForms some using Activate and some using Initialize.
    Should I consolidate them to one type?
    Please test any VBA code I suggest in a copy of your file. If the code errors or deletes your data it is not able to be undone.

    Check out my public Excel Templates on my SkyDrive: http://sdrv.ms/1j37KgJ
    I specialise in trying to answer the more difficult questions (Eg copying a screenshot of cells and pasting them inside a cell comment)


    Home: Mac Book Pro | Snow Leopard | Excel for Mac 2011
    Home: Windows 7 | Excel 2010 (Running on Parallels Desktop as a VM)

  2. #2
    Board Regular
    Join Date
    Jul 2011
    Posts
    127

    Default Re: UserForm Initialize and Activate


  3. #3
    Board Regular AD_Taylor's Avatar
    Join Date
    May 2011
    Posts
    687

    Default Re: UserForm Initialize and Activate

    Great thanks for this! I did a quick search but couldn't find anything relevant.

    Looks like I'll need to switch to using 'Activate' every where then...
    Please test any VBA code I suggest in a copy of your file. If the code errors or deletes your data it is not able to be undone.

    Check out my public Excel Templates on my SkyDrive: http://sdrv.ms/1j37KgJ
    I specialise in trying to answer the more difficult questions (Eg copying a screenshot of cells and pasting them inside a cell comment)


    Home: Mac Book Pro | Snow Leopard | Excel for Mac 2011
    Home: Windows 7 | Excel 2010 (Running on Parallels Desktop as a VM)

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com