Change format of a cell
I am having problems formatting a cell when sending a value from a textbox. Here is a part of what is being done
A User will enter a series of numbers into a textbox. When they exit the textbox, the value is reformate
'Add dashes when exiting textbo
MRN_TxBx.Value = Format(MRN_TxBx.Value, "#00-00-00"
If the user decides to re-enter the textbox, it removes the dashes to avoid any confusio
'Remove all dashes when entering textbo
MRN_TxBx.Value = Replace(MRN_TxBx.Value, "-", ""
When all is done, I copy the value to a cell with the following
'Format cell & add valu
.Cells(NxtRow, 1).NumberFormat = "General
.Cells(NxtRow, 1) = Data_Frm.MRN_TxBx.Valu
When I check the cell with the value, the format of the cell is always a date. I don't want a date format, I need it to be general or text. Any ideas
Thanks...
|