+ Reply to Thread
Results 1 to 10 of 10

UserForm.Listview date changes when transferred second UserForm2.ListView

  1. #1
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    UserForm.Listview date changes when transferred second UserForm2.ListView

    Hi all

    I have a list of invoices on a UserForm1.Listview , I do some selections and move to my selections to the second UserForm2.Listview but the date format changes,

    UserForm1.Listview data comes form an excel sheet which shows the date format as 04 June 2020 (04/06/2020) which is correct but when I transfer the data to UserForm2.Listview it changes to 06 April 2020 (06/04/2020)


    Please see the attachement
    Any idea why or is there a way to avoid this?
    Attached Images Attached Images

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    a workbook is worth a thousand picture - especially when the picture is unreadable.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  3. #3
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    Hi

    I tried in word format this time , I hope this will work.

    many thanks
    Attached Files Attached Files

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    please read the big yellow banner and upload a cutdown version of your workbook.
    we cannot analyse a picture - the fault is in your code - therefore this needs altering and testing
    we could spend ages guessing - help us to help you

  5. #5
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    Third time lucky

    I have attached a test version , when you open the attached excel, it will automatically open Excel User Form,

    from the Listview1 you can bulk select the data by holding your SHIFT key and click the mouse then there is Select Invoices button when you click that it will list your selection on the above Listview2

    then you will see that the date will change different format. basically days become month if it is up to number 12. How do fix this?

    I hope I managed to explain

    PS: in the coding section you might see some coding that were belong to buttons that i took out, so please ignore

    thanks again
    Attached Files Attached Files

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    How about supplying a file that just contains the troublesome code.
    99% of the code is totally irrelevant to your application and at times locks up.
    why is it a multi-lingual patchwork of code

  7. #7
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    basically when you click the Select Invoice button this part of the code transfers the date from the Rapor Sheet to the Multi Sheet and I realised when the dates were transferred to the Multi sheet Column D ,it changes the format other way round so 04/06/2020 becomes 06/04/2020

    Please Login or Register  to view this content.

    thank you again for your interest

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    You could use:

    Please Login or Register  to view this content.
    Rory

  9. #9
    Forum Contributor
    Join Date
    08-29-2006
    Location
    London
    MS-Off Ver
    Excel 2016
    Posts
    314

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    Quote Originally Posted by rorya View Post
    You could use:

    Please Login or Register  to view this content.
    thank you very much, this worked perfectly. You are a legend

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: UserForm.Listview date changes when transferred second UserForm2.ListView

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Add image to Listview on Userform
    By pmlv in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2021, 11:30 AM
  2. ListView or ListBox for userform?
    By TheRobsterUK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-10-2017, 06:23 AM
  3. UserForm ListView - autofit rows?
    By mike.magill in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2016, 09:57 AM
  4. [SOLVED] HELP! can't add listview activex in userform :(
    By radian89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2015, 09:05 AM
  5. [SOLVED] add listView to userform programatically
    By contaminated in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2012, 05:11 PM
  6. Listview checked row delete line in Listview and in worksheet data
    By madforit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2012, 01:00 PM
  7. Help - Getting Data into Userform ListView
    By Paparasee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-03-2011, 03:51 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