View Single Post
  #8   Report Post  
Dave Peterson
 
Posts: n/a
Default

Glad you got it working.

Nigel wrote:

Hi,
I have solved the problem thats to your direction.

QuoteDay & "\" & QuoteMonth & "\" & QuoteYear
is what i used to use but when i changed it around to give me todays date,
( i used to select date, mont from cbo box) i forgot to edit here so the\\
was infact coming from here. now removed. no more \\ :)

Thanks,

Nigel

"Dave Peterson" wrote:

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


--

Dave Peterson