![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 3
|
I'm creating a control Combo Box with my List Fill Range going to a range like this:
January-2002 February-2002 March-2002 April-2002 Both my dropdown and my linked cell are displaying the data as a Julian Number not a Date format. The displayed list is correct, but once you select it the selection & linked cell are wrong. I cannot find how to change my format for the dropdown selection display & linked cell. My list fill range is formated in date format. And on the linked cell changing the format there doesn't fix it. I found it works when I use a List Box, but not a Combo Box. Thanks in advance. Chad [ This Message was edited by: Norton on 2002-03-08 13:59 ] |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
Code:
Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Text, "mmmm-yy")
End Sub
-Russell |
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Posts: 3
|
Thanks, it partially worked, the dropdown does display the correct format, however the linked cell still doesn't, and actually I want the linked cell to be bound to column 2 in that lookup table (a 1 for Jan, 2 for Feb, etc...) And when I do that it doesn't work again because it's trying to format a 1 as a date and getting a Runtime error Could not set value property: Invalid property attribute. All I'm getting in the linked cell is the Julian. Thanks again.
[ This Message was edited by: Norton on 2002-03-08 15:12 ] |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
Quote:
Code:
Private Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Text, "mmmm-yy")
Sheets("MySheetWithLinkedCell").Range("A1") = ComboBox1.ListIndex + 1
End Sub
Hope this helps, Russell |
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Mar 2002
Posts: 3
|
Worked great, THANKS.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|