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
|