LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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...
 
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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Changing the cell format doesn't change existing cell content Kate Excel Discussion (Misc queries) 2 January 14th 10 04:44 PM
cant change the cell format it shows too many different cell form not able to make changes in sheet Excel Worksheet Functions 0 January 9th 07 04:16 AM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
How do i change the format of a cell based on the condition of another cell in same row? scott23 Excel Programming 1 January 6th 04 03:03 PM


All times are GMT +1. The time now is 08:47 PM.

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

About Us

"It's about Microsoft Excel"