+ Reply to Thread
Results 1 to 3 of 3

Copy a Value from UserForm to cell

  1. #1
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Copy a Value from UserForm to cell

    Hi

    I have a UserForm I'm using.
    And I'm using this code for it:
    Please Login or Register  to view this content.
    And the part that bothers me is that values from txtDatumN and txtRokDob are sopose to be paste down as dates but are pasted down as text looking like a date. I have the cells where these 2 values get copyed in set as cells that are Dates.
    So what I'm asking here is how can I make it past down not as a text but as a date?
    Becose if it's passed down as a date the codittional formatting of the cells doesn't work.
    Last edited by stojko89; 11-29-2011 at 08:26 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Copy a Value from UserForm to cell

    Hi,

    Use DateValue rather than Format as the latter will always return a text string.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Copy a Value from UserForm to cell

    Thanks Domski that was easy and it works. :D

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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