userform questions

  • Thread starter Thread starter antonov
  • Start date Start date
A

antonov

Hello again everybody.
I have this userform in which I would like to add a combobox that has to
take the data from the first column of a certain sheet (sheet Data column
A). How can I achieve that?
The same userform has some fields in which the date input. When the date
goes to the right cell the format in not correct. I've checked the format of
the cell and it is the right one (in fact if I input the date without using
the userform the format is correct - 01aug will display 01-aug-06) any idea
on how to fix this problem?
Thanks
 
Private Sub UserForm_Activate()
Dim cnt As Long
Dim lRow As Long
ComboBox1.Clear
lRow = Sheets("Data").Range("A" &
Sheets("Data").Rows.Count).End(xlUp).Row
For cnt = 1 To lRow
ComboBox1.AddItem Sheets("Data").Range("A" & cnt), cnt - 1
Next
End Sub

That should Load the combobox upon activation. I'm not sure what you
are asking with you 2nd question

Charles Chickering
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top