+ Reply to Thread
Results 1 to 2 of 2

Problem with formatting after exported userform data

  1. #1
    Registered User
    Join Date
    09-29-2012
    Location
    Drammen
    MS-Off Ver
    Excel 2010
    Posts
    5

    Problem with formatting after exported userform data

    Hi,
    I have a problem with date formatting when exporting data from userform data into worksheet. When I export the worksheets automatically think that the date is text. The problem starts when I use Pivot table and excel dont formate it into correct formate (date) . I want the date to be dd.mm.yyyy.

    Please help me. I`m unable to define the variable correctly. I have tried to Dim .... As Date, but it won't work

    This is my code

    'Aktiverer fengslingsliste
    Sheets("Fengslingsliste").Activate

    'definerer emptyrow
    emptyrow = WorksheetFunction.CountA(Range("A:A")) + 1

    'Finner korrekt informasjon
    Cells(emptyrow, 1).Value = txvfd.Value
    Cells(emptyrow, 2).Value = txbSnr.Value
    Cells(emptyrow, 3).Value = txbEtternavn.Value
    Cells(emptyrow, 4).Value = jurist.Value
    Cells(emptyrow, 5).Value = etterforsker.Value
    Cells(emptyrow, 6).Value = lovo.Value
    Cells(emptyrow, 7).Value = parnr.Value
    Cells(emptyrow, 8).Value = fv.Value
    Cells(emptyrow, 9).Value = "1"
    Cells(emptyrow, 10).Value = txbfd.Value


    'Får txtboks som sier ok
    MsgBox ("Registrering vellykket")

    'Sletter data
    txbfd.Value = ""
    txbSnr.Value = ""
    txbEtternavn.Value = ""
    jurist.Value = ""
    etterforsker.Value = ""
    lovo.Value = ""
    parnr.Value = ""
    fv.Value = ""
    txbft.Value = ""

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Problem with formatting after exported userform data

    Can you place an example of your file?

+ 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] Problem with a sum of exported data from another program.
    By alxes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-20-2013, 12:55 PM
  2. Formatting a list exported from SharePoint
    By Mirabyshirt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2012, 09:22 AM
  3. [SOLVED] Userform TextBox Problem... formatting code clears data instead of formatting
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2012, 11:00 AM
  4. Excel 2007 : Formatting an exported Excel document
    By hermanpeckel in forum Excel General
    Replies: 1
    Last Post: 06-15-2012, 07:12 AM
  5. Problem with commas in exported text files
    By samf88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2007, 04:11 AM
  6. Formatting exported DB data with IF(AND)?
    By firefiend in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2007, 12:37 PM
  7. Conditional Formatting not applied to data exported from Access
    By Mark A in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-24-2005, 08:05 AM
  8. How to Clean up exported Userform.frx?
    By davidm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-13-2005, 05:05 AM

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