+ Reply to Thread
Results 1 to 1 of 1

Date format error when coping from VBA to excel range

  1. #1
    Registered User
    Join Date
    12-18-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    1

    Date format error when coping from VBA to excel range

    I am struggling to identify Date format error when copying from VBA to excel range. Please help.

    I have an excel table ("tblJobList") acting as a database of current jobs and I am using dialog boxes to update the data including text boxes for dates. I use vba code to enforce UK format "dd/mm/yy". I have a problem that some dates end up the wrong format "mm/dd/yy" once they are copied into the excel range. NB it is inconsistent and some dates are in correct format.

    Using the Local window to view the data structures I see that vaData(1,4) is type Variant/String but rgData.value2(1,4) is type Variant/Double

    Below is the code extract.

    -------------------------------------------------------------------
    Please Login or Register  to view this content.
    Last edited by acoaton; 12-21-2015 at 07:43 AM. Reason: Added missing CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

+ 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. Replies: 0
    Last Post: 08-13-2015, 03:24 PM
  2. Excel 2007 Conditional Format date range
    By thomasoj01 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2014, 05:49 PM
  3. [SOLVED] help on vba code to change the error date format as standard format mm/dd/yyyy
    By johnodys in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 01:10 AM
  4. Column Range with date Format MM/DD/YYYY independate of sys date Format
    By gaursh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2011, 03:31 AM
  5. Coping down error
    By bud77 in forum Excel General
    Replies: 2
    Last Post: 07-12-2008, 07:58 PM
  6. How do I fix a date format error in Excel?
    By Dale_C141 in forum Excel General
    Replies: 2
    Last Post: 05-27-2006, 01:15 AM
  7. Coping a Worksheet - but Getting an Error
    By Max in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2006, 04:45 PM

Tags for this Thread

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