Transfer data from workbook to a .txt and keep formatting RRS feed

  • Question

  • Afternoon

    I have a command button which opens a new workbook, copies data from another workbook into the new and then saves the new workbook as a .txt file.

    One of the cells the data comes from is in time format hh:mm, but when I open the .txt file to see the data that has been transferred this particular data is now in decimal and does not resemble a time.

    The code I am using to transfer the data is:

    Dim TimeA as string
    TimeA = Worksheets("Data").Range("B2")
    Worksheets("Transfer").Range("B25") = TimeA

    is there something I should be adding to the second reference to TimeA?



    Thursday, January 17, 2019 4:05 PM


All replies