Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to set the format of a cell in vb?
I have a sheet with a calendar control and if the user presses the calendar whilst on a cell with format of number 2 decimal places the format changes to date making any input to the cell invalid until the format is changed back. Thanks Lynda |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Lynda,
All cells can be changed by the Numberformat property, such as ActiveCell.NumberFormt = "dd mmm yyyy" or you can test it If ActiveCell.Numberformat = "0.00" Then ... -- HTH RP (remove nothere from the email address if mailing direct) "Lynda" wrote in message ... Is it possible to set the format of a cell in vb? I have a sheet with a calendar control and if the user presses the calendar whilst on a cell with format of number 2 decimal places the format changes to date making any input to the cell invalid until the format is changed back. Thanks Lynda |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activecell.Numberformat = "#,###.00"
-- regards, Tom Ogilvy "Lynda" wrote in message ... Is it possible to set the format of a cell in vb? I have a sheet with a calendar control and if the user presses the calendar whilst on a cell with format of number 2 decimal places the format changes to date making any input to the cell invalid until the format is changed back. Thanks Lynda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting special format for a cell | Excel Worksheet Functions | |||
Setting the date format | Excel Discussion (Misc queries) | |||
Setting Excel cell format | Excel Worksheet Functions | |||
I need help in setting my paper in apa format in microsoft | Excel Discussion (Misc queries) | |||
need help setting a simple format to keep rent. | New Users to Excel |