+ Reply to Thread
Results 1 to 4 of 4

Creating and error Message Userform

  1. #1
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Creating and error Message Userform

    Hello,

    I am trying to create an userform that will act as an error display. The reason why I want to use the form and not a regular MsgBox is because I want to include a very simple small tutorial of what went wrong. In most cases will be that all the data was not imported correctly and the pivot tables cannot refresh properly.

    My form should have.

    1. An icon to make very clear that the operation that was attempted failed. (vbwarning)
    2. Sound if possible.
    3. It will have a small description of the issue and below a picture with the correct settings. This causes an issue. I will be using about three pictures but they have to be big enough so the user can see them. How can I arrange items in a relatively small userform with a scroll bar on the side?

    thanks a lot guys.

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Creating and error Message Userform

    Quote Originally Posted by fredlo2010 View Post
    I am trying to create an userform that will act as an error display. The reason why I want to use the form and not a regular MsgBox is because I want to include a very simple small tutorial of what went wrong.
    I admire your ambition. There are a lot of VBA error descriptions out there - you are going to write a tutorial for all of them?!


    Quote Originally Posted by fredlo2010 View Post
    My form should have.
    1. An icon to make very clear that the operation that was attempted failed. (vbwarning)
    2. Sound if possible.
    3. It will have a small description of the issue and below a picture with the correct settings. This causes an issue. I will be using about three pictures but they have to be big enough so the user can see them. How can I arrange items in a relatively small userform with a scroll bar on the side?
    1 = should be no problem.
    2 = I may be wrong on this - but I think VBA can only play a beep sound (just type beep in a sub line). (Unless there is a way to have the sound played by an outside application like Windows Media Player?)
    3 = It's hard to help out this without seeing some idea of what you want your form to look like. Would you be able to dummy up a sample form and upload it in a workbook to this thread?

    BTW I'm unclear as to whether you only require assistance with the design the form or whether you need the code as well. Do you have any error code completed/in progress?
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  3. #3
    Valued Forum Contributor fredlo2010's Avatar
    Join Date
    07-04-2012
    Location
    Miami, United States
    MS-Off Ver
    Excel 365
    Posts
    762

    Re: Creating and error Message Userform

    Here is a sample of an error I created with a complicated form. ( it might be a little distorted because it was created for my work's computer resolution)

    https://dl.dropbox.com/u/30987064/Book1.xlsm

    Regards

  4. #4
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Creating and error Message Userform

    It looks to me like goals 2 & 3 are already achieved. Correct me if I am wrong but you only require the warning icon now, right?

    Also:
    • Do you intend to write an error tutorial for every possible VBA error?! Or just the 'data was not imported correctly and the pivot tables cannot refresh properly'?
    • If the latter, do you have the Err.Numbers for these two issues? (So that the ErrorForm only shows when these errors appear - as opposed to showing when any VBA error occurs)

+ 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