English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I designed a form to colect data, one of the field is a combo box where a have a list of dates (in format dd/mm/yyyy). When I select it display me the list containing dates, but when I select one of the dates -- it display like a long number. I looked if I can set the data I expect in the combo box -- and I could not find any options.Can you help me?
And a completly separate think: can I make a sub to run when a sheet become active. Something like when the excel user click on one sheet -- to automaticly run a sub in that particular sheet? I couldn't find(I know it is possible to run at the opening of a workbook -- but I was wantering if it is posible when you open/activate from excel/ a worksheet)
Thank you

2007-02-11 19:47:45 · 3 answers · asked by Cornel 2 in Computers & Internet Programming & Design

I designed a form to colect data, one of the field is a combo box where a have a list of dates (in format dd/mm/yyyy). When I select it display me the list containing dates, but when I select one of the dates -- it display like a long number. I looked if I can set the data I expect in the combo box -- and I could not find any options.Can you help me?
And a completly separate think: can I make a sub to run when a sheet become active. Something like when the excel user click on one sheet -- to automaticly run a sub in that particular sheet? I couldn't find(I know it is possible to run at the opening of a workbook -- but I was wantering if it is posible when you open/activate from excel/ a worksheet)
Thank you
One mention -- although the data is displayed as a long number on the form -- when I use the data(in module) is using it fine(as a date). Is not a question of working fine, is more like a view problem(I would like to see a date in a como box after I select and not a long number

2007-02-11 20:08:02 · update #1

3 answers

!st Que.

look like a data conversion problem. Use CDate, CStr functions to add to combo or while reading from combo. It very difficult to say which line of code is causing error. if u can put code snippet, can tell u something.



@nd Que.

There is an event for worksheet

Private Sub Worksheet_Activate()

End Sub

2007-02-11 20:00:31 · answer #1 · answered by where i am... 3 · 0 0

maximum ideal answer to General_Payne. i'd basically upload that once you've a destroy in the documents in column A (a sparkling row), then the top(xlDown) technique will use the cellular at present previous the sparkling row because the 'very last' row. As a 'basically in case', I continually use the top(xlUp) technique.

2016-12-04 01:57:17 · answer #2 · answered by ? 4 · 0 0

Write psuedo dates instead eg 20070213 until you figure a way to handle this.

2007-02-12 14:20:09 · answer #3 · answered by unnga 6 · 0 0

fedest.com, questions and answers