+ Reply to Thread
Results 1 to 10 of 10

Userform Date Format Error 6 Overflow

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    19

    Userform Date Format Error 6 Overflow

    Hello,

    I am getting an Error 6 overflow, when I enter in my userform a date like this 01.01.20133. After I press enter or tab in the userform the error occurs and the debugger goes to the code shown below.

    I don't understand why I am getting this error. I don't know if this occured before or if I just never entered the date incorrectly like that.
    However it is quite a nuisance to have the userform crash only because a number is wrong.

    Can I do something to keep the formatting and also prevent crashing of the userform?

    Kind Regards
    Prexcel

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Userform Date Format Error 6 Overflow

    You may try:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Userform Date Format Error 6 Overflow

    An idea could be to use a date picker.

    http://www.excelforum.com/excel-prog...-required.html
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    11-25-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Userform Date Format Error 6 Overflow

    I was contemplating date picker earlier but its not part of the excel 2010 portfolio in my company. So that is off the table

    Thanks anyway!

  5. #5
    Registered User
    Join Date
    11-25-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Userform Date Format Error 6 Overflow

    Thanks Izandol,
    I gave it a shot and it seems to remove the problem.

    I will try this for the whole form, and cross my finger that it becomes the solution!

    Do you know by any chance why the overflow error happends in the first place?
    Last edited by Prexcel; 01-17-2014 at 07:02 AM.

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Userform Date Format Error 6 Overflow

    I use this date picker in Excel 2010 without any problem.

    Also this is very interesting.

  7. #7
    Registered User
    Join Date
    11-25-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Userform Date Format Error 6 Overflow

    @Fotis, That is indeed interesting.
    Appreciated!

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Userform Date Format Error 6 Overflow

    You are welcome and thanks for the feedback.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Userform Date Format Error 6 Overflow

    Input is not recognised as date so is converted to Long (10120133) and then Format will try to convert this to date value. Maximum permitted value for date value is 31 December 9999, which is 2958465 as Long. Therefore overflow occurs.

  10. #10
    Registered User
    Join Date
    11-25-2013
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Userform Date Format Error 6 Overflow

    @ Fotis: No problem and done!
    @ Izandol: I understand now! Thanks for the explanation.

+ 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] Excel 2007, Userform Textbox Date Format and Calendar Control Userform
    By riffology in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2014, 06:18 PM
  2. Large Number Date Format Overflow Error
    By goss in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-12-2013, 05:55 PM
  3. [SOLVED] Userform date entered in UK format but showing in US Format in spreadsheet
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-23-2013, 01:59 PM
  4. Want to do a while-loop but get error message: run error '6' overflow
    By danzi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-07-2011, 01:48 PM
  5. Userform date format reverting back to us format on change event
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-10-2009, 12:34 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