+ Reply to Thread
Results 1 to 9 of 9

((SOLVED))Tabular Error Messages

  1. #1
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Thumbs up ((SOLVED))Tabular Error Messages

    I have a workbook that contains tabs such as 04-27-2014, 04-28-2014....etc. I dont want any other format than that. Can I input an error message if a user trys to enter a different format such as 4-27-2014 or 4-27-14? Thanks in advance.
    Last edited by flextera; 07-03-2014 at 02:57 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Tabular Error Messages

    This works - perhaps some variant?

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Tabular Error Messages

    Could you provide a sample sheet so that I can learn from this alittle. I dont do much with VB.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Tabular Error Messages

    This is a workbook Event macro, it goes in the ThisWorkbook module in the VBA editor. It runs itself based on the event being watched. In this case it triggers itself anytime a new sheet is added.

    1) Open the VBA Editor
    2) Open the ThisWorkbook module
    3) Paste in the event code given above
    4) Close the VBA editor
    5) Save your workbook as a .xlsm to preserve the vba
    6) Try adding a new sheet

    http://screencast.com/t/BhpGbBUuWXWP
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  5. #5
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Tabular Error Messages

    I entered that in and saved it as a Macro enabled worksheet but it still lets me enter m-dd-yyyy?

  6. #6
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Tabular Error Messages

    Capture.PNG Here is what I have in the Workbook module

  7. #7
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Tabular Error Messages

    Nevermind it worked!! Thanks a ton you two :d :d :d :d

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: ((SOLVED))Tabular Error Messages

    @ Jerry - thanks for fielding the follow up and, thanks for the rep!

    @ flextera - You're welcome and, thanks for the rep!

    *does that solve your problem or would you like other features?

  9. #9
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: ((SOLVED))Tabular Error Messages

    This completely solves my problem. Everything works perfectly. Thanks for the Code!

+ 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. [SOLVED] Error Handling: Creating code to display error messages
    By Student1990 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-01-2013, 02:21 PM
  2. [SOLVED] lookup - if(is error(vlookup and error messages meanings
    By grphillips in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-18-2013, 07:03 PM
  3. Replies: 5
    Last Post: 11-10-2009, 07:06 AM
  4. Error Messages
    By Kathy in forum Excel General
    Replies: 9
    Last Post: 05-16-2006, 10:10 AM
  5. [SOLVED] error messages-Is there a way to show error messages
    By hans in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-02-2006, 12:45 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