LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Dave Peterson
 
Posts: n/a
Default

I was guessing that this line:

ActiveCell.FormulaR1C1 = QuoteDay & "/" & QuoteMonth & "/" & QuoteYear

Was actually filling the cell with the value from the textbox. (But I didn't
look at the code enough to see what called what, and where
QuoteDay/QuoteMonth/QuoteYear were updated.)


with activesheet.range("H9")
If IsDate(UserForm1.TxtQuoteDay.Text) Then
.value = CDate(UserForm1.TxtQuoteDay.Text)
.NumberFormat = "mm/dd/yyyy"
Else
.value = "Not a date"
End If
end with

Although, I would suspect that it would be better to validate your date before
you try to plop it back into the worksheet.

Nigel wrote:

Hi,

It still shows the // no matter what format i change the cell to. I have
looked at your remedy but not entirely sure where to put it.

Regards,

Nigel

<<snipped
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to format a date to a different format Laura Excel Discussion (Misc queries) 1 March 5th 05 09:59 PM
Date Math Problem Dkline Excel Worksheet Functions 4 March 4th 05 04:11 PM
Date format on a drop down box Steven Cheng Excel Discussion (Misc queries) 6 February 9th 05 03:13 AM
Converting numbers to date format from csv files FiBee Excel Discussion (Misc queries) 1 January 12th 05 01:30 PM
Problem with date base units for x axis Peter Carr Charts and Charting in Excel 1 December 15th 04 09:11 AM


All times are GMT +1. The time now is 02:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"