Results 1 to 21 of 21

Date Format Change in other systems and due to that Macro doesn't work properly

Threaded View

  1. #1
    Registered User
    Join Date
    09-05-2012
    Location
    Ghaziabad
    MS-Off Ver
    Excel 2003,07,10,13
    Posts
    52

    Date Format Change in other systems and due to that Macro doesn't work properly

    Hello Guys,

    I am having quite a hard time to solve this issue as it's working seamlessly on my system and any other system which has system date format in US, i.e. mm-dd-yyyy, however, the issue is that client is from Europe and their system date formats are different and can be anything, e.g. dd-mm-yyyy or anything.

    I tried everything to keep the date format constant but it's futul and generating the issue on client's system because the process doesn't run.

    Here in the attached workbook "Main" sheet, there is a button called "Generate Billing/Contract" when it's clicked, an userform pop-up with 2 option buttons, 1st is for Billing Invoice & 2nd for Rent Agreement, after selecting whichever, there is userform which requires to be filled with the information from the "Reservation_Raw" sheet and create the Invoice/Agreement accordingly but issue as I explained, arise when system date format is other than USA standard date format because the data is also in US date format and in client's system, after selecting "Check In" date, they get "Check Out" date blank and other fields are also blank because all the fields are interconnected.

    Below is the sample of code where issue arise:

    
    On Error GoTo Single_Date:
    Me.cb_CheckOut.List = cRng.Value
    Single_Date:
    If Err.Number > 0 Then
    Me.cb_CheckOut.Clear
    'Me.cb_CheckOut.AddItem Format(wsR.Range("BB" & lrw).Value, "DD-MM-YYYY HH:MM:SS")
    Me.cb_CheckOut.AddItem wsR.Range("BB" & lrw).Value
    Resume Clear_Err:
    Clear_Err:
    End If
    I tried to attach the workbook also for your kind perusal but I am not able to as attachment option is not working while posting this issue here but if you need, please let me know how can I provide the workbook.

    Kindly help me out in this as being stuck for last some weeks and due to this project is not finished.

    Thanks a lot.
    Last edited by brajpalshishodia; 07-08-2019 at 08:48 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Date doesn't work properly with Filter
    By davidbelaev in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-19-2017, 07:01 PM
  2. Old excel file with picture insert macro doesn't work properly...
    By rcurious in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2014, 05:56 PM
  3. macro to copy cells to a new workbook doesn't work properly
    By dileva in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2013, 10:55 AM
  4. [SOLVED] Event macro runs in wrong workbook/doesn't work properly
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-30-2012, 11:28 AM
  5. [SOLVED] Complicated Macro doesn't work properly if lines are deleted
    By BuzzOffSweetheart in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-11-2012, 01:32 PM
  6. Worksheet change event doesn't work properly
    By ffandango in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2009, 06:03 PM
  7. Replies: 0
    Last Post: 02-10-2005, 02:46 AM

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