+ Reply to Thread
Results 1 to 7 of 7

Dialog box - Excel 2010

  1. #1
    Registered User
    Join Date
    12-17-2014
    Location
    Sao Paulo, Brazil
    MS-Off Ver
    2010
    Posts
    23

    Dialog box - Excel 2010

    I need to insert in my workbook a dialog box which needs to be visible when switching from one worksheet to another. This dialog box needs to open automatically as the workbook is opened and buttons associated to macros will be placed over it. I have tried as a message box, but it doesn't allow me to switch through the tabs. I believe this needs to be written as a User Form, but not sure how to make it visible all the time... The expected result should be similar to the attached image. Does anyone knows how can this be written? I am using Office 2010, if that helps... Thank you.

    ScreenHunter_02 Dec. 23 09.54.jpg

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Dialog box - Excel 2010

    That would be a userform, google "create a userform in excel" to find many examples.

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Dialog box - Excel 2010

    If you have already designed your userform1, you may try the below codes to achieve this......

    Copy the below codes and place them on ThisWorkbook Module.....
    Please Login or Register  to view this content.
    Does this help?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    12-17-2014
    Location
    Sao Paulo, Brazil
    MS-Off Ver
    2010
    Posts
    23

    Re: Dialog box - Excel 2010

    Hi sktneer, this worked almost as expected... now even if I close the box, ifI go to another tab it opens again, and even if I am looking into another workbook, the dialog box is there... so is there a way to restrict its view only to the workbook and, once close, it remains close unless the user call it again? Thank you

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Dialog box - Excel 2010

    Place below code on the Sheet Module of the Sheet on which you want to show the userform. To do so, right click on that Sheet Tab --> View Code and paste the following code on the opened code window.

    Please Login or Register  to view this content.
    And delete the following code from ThisWorkbook module.

    Please Login or Register  to view this content.
    Hope this helps.

  6. #6
    Registered User
    Join Date
    12-17-2014
    Location
    Sao Paulo, Brazil
    MS-Off Ver
    2010
    Posts
    23

    Re: Dialog box - Excel 2010

    Hi sktneer, thanks that helped a lot.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Dialog box - Excel 2010

    You're welcome. Glad I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. UDT passing byref works in WinXP Excel 2010 fails on Win7 64 bit Excel 2010 32 bit
    By MarkInKeizer in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2014, 11:49 AM
  2. [SOLVED] Window 7 - Excel 2010 setting? VBA ActiveSheet.SaveAs Filename not posting name to dialog
    By portews in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2013, 03:16 PM
  3. Excel 2010, Access 2010, SQL Insert and Update Statments and NULL value in Field
    By jmmach72 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 02:35 PM
  4. Excel 2010 64-bit Browse for folder Dialog box
    By c.vaibhav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2010, 02:27 PM

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