+ Reply to Thread
Results 1 to 7 of 7

Userform to Open with Microsoft Spreadsheet

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    88

    Question Userform to Open with Microsoft Spreadsheet

    Hi guys,

    I need my UserForm to start when I open the spreadsheet? Anyone know how to do this?

    Excel Headings Problem - Macro V10.xlsm

    Any help would be greatly appreciated.
    Last edited by Ardiko; 09-24-2012 at 10:45 AM.

  2. #2
    Forum Contributor
    Join Date
    03-15-2007
    Location
    AL, USA
    MS-Off Ver
    2007
    Posts
    174

    Re: Userform to Open with Microsoft Spreadsheet

    To have the userform open when the workbook is opened, the following code must be place in the ThisWorkbook object (open this section by double-clicking the ThisWorkbook item in the Project pane on the left ofthe VB editor window). This will open that section, and then just paste the code there.
    Please Login or Register  to view this content.
    Last edited by mshale; 09-24-2012 at 10:39 AM. Reason: removed extraneous info

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: Userform to Open with Microsoft Spreadsheet

    Thanks for your help!

  4. #4
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Userform to Open with Microsoft Spreadsheet

    Ardiko,

    The code also works if placed in a module and called. Do you want the form to open everytime you open the workbook or when there are certain criteria, like only open on the first time?

  5. #5
    Registered User
    Join Date
    08-13-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: Userform to Open with Microsoft Spreadsheet

    Mowgli,

    I want it to open everytime I turn on the excel sheet but I want to be able to deselect and select the form with ease. At present if I want to change anything on the excel sheet I have to close it down and re-open it. Is there a way to simultaneously run both? Ultimately I want to make it a stand alone form that I can alter a excel sheet with.

    I've attached the sheet if you have time to have a look.

    Excel Headings Problem - Macro V10.xlsm

  6. #6
    Forum Contributor
    Join Date
    02-24-2011
    Location
    Belfast, N. Ireland
    MS-Off Ver
    Excel 2010
    Posts
    103

    Re: Userform to Open with Microsoft Spreadsheet

    Ardiko,

    The simplist way is to have a button which calls the form when you want it. I have attached one in the Sheet and put the CallForm macro in Module 6. It uses the same command as the Auto Open when Excel starts.

    I notice you have a Headings button still on the sheet, so assume you are happy working with buttons. I used a Form Control button instead of ActiveX as my machine has been playing up with ActiveX controls when cells are hidden and then unhidden however if you prefer ActiveX then you could write the code into the button instead of having it call a separate piece of code.

    Excel Headings Problem - Macro V10 Rev A.xlsm
    Last edited by Mowgli; 09-25-2012 at 10:35 AM. Reason: Attachment incorrect

  7. #7
    Registered User
    Join Date
    08-13-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    88

    Re: Userform to Open with Microsoft Spreadsheet

    Thanks Mowgli for the help! I have only recently started to work on this project again. +Rep

+ 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