Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Is there any way to control the format in UserForm controls (like
there is in cells) to accomplish a WYSIWYG setup? The "problem" is like this; I set up a combobox on a form to select a date in mm/dd/yy format - the data comes from a range of cells formatted to show dates ("TODAY()", TODAY+1", etc.) formatted as "mm/dd/yy" & the cell the selection is written to is also formatted the same...yet the ComboBox on the form shows the 5-digit Excel date code until the focus shifts off the ComboBox, then shows the form mm/dd/yyyy (& additionally drops preceeding zeroes) - even though the format is correct in the destination cell once the UserForm is closed. What I'm trying to avoid is confusion in the minds of some of the folks who will be using this workbook...not all of them are especially bright nor computer-literate. TIA. tm |
#2
![]() |
|||
|
|||
![]()
I presume that you have a link to the worksheet cells and pick up those
values automatically. I am afraid that if you want the dates formatted, you will need to manually load them, something like With Me.Combobox1 .AddItem ActiveSheet.Range("A1").Text .AddItem ActiveSheet.Range("2").Text 'etc. End With if the worksheet dates are already formatted, or With Me.Combobox1 .AddItem Format(ActiveSheet.Range("A1").Value,"mm/dd/yyyy") .AddItem Format(ActiveSheet.Range("A2").Value,"mm/dd/yyyy") 'etc. End With if they are not -- HTH RP (remove nothere from the email address if mailing direct) "grasping@straws" wrote in message ... Is there any way to control the format in UserForm controls (like there is in cells) to accomplish a WYSIWYG setup? The "problem" is like this; I set up a combobox on a form to select a date in mm/dd/yy format - the data comes from a range of cells formatted to show dates ("TODAY()", TODAY+1", etc.) formatted as "mm/dd/yy" & the cell the selection is written to is also formatted the same...yet the ComboBox on the form shows the 5-digit Excel date code until the focus shifts off the ComboBox, then shows the form mm/dd/yyyy (& additionally drops preceeding zeroes) - even though the format is correct in the destination cell once the UserForm is closed. What I'm trying to avoid is confusion in the minds of some of the folks who will be using this workbook...not all of them are especially bright nor computer-literate. TIA. tm |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
An easy macro question and one I believe to be a little more diffi | Excel Worksheet Functions | |||
2 part question on averaging | Excel Discussion (Misc queries) | |||
Link Question | Excel Worksheet Functions | |||
Interest Accrual Question | Excel Discussion (Misc queries) | |||
test for date in column question | Excel Worksheet Functions |