LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default VBA with userform in excel

This is a second post, trying to 'word' it better than my earlier
post. My excel file: contains columns A to U with about 1600 rows of
data. The data is all employee information, including Employee ID,
Name, Supervisor Name, Hire Date, Salary...etc.

What I have so far is a user form with a combobox1 and a textbox1.

combobox1 properties include the row source to equal: A2:A1600

Column A is the employee ID. This works fine, the ID show up in the
drop down.

For the Textbox1 I would like the value from Column B (employee name)
to be displayed where the ID is shown in the combobox1.

I'm very new to VBA and userforms, here is what I have so far....

Private Sub ComboBox1_Change()
Dim ID

ID = ComboBox1.Value

If ComboBox1.Value < "" Then
TextBox1.Text = ActiveCell.Offset(0, 1).Value
End If

End Sub

I know this is way wrong, but what shows up in the Textbox is the
Column Heading 'Name' from column B. I'm looking for, of course, the
name of the employee. For example, if cell A50's value is 5300 and
B50 is John Smith...it is John Smith I'd like to see in textbox1. I
hope this is making sense....as suggested from other postings, I'm
trying to explain the problem as well as give examples of what I
tried...thanks for those that respond!....

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
display status bar value in excel userform? Al B Excel Discussion (Misc queries) 0 November 15th 06 01:21 PM
Userform in excel ST Excel Discussion (Misc queries) 2 July 13th 06 10:16 AM
Userform Jeff Excel Discussion (Misc queries) 1 April 25th 06 07:30 PM
Userform Jeff Excel Discussion (Misc queries) 0 February 6th 06 09:30 PM
UserForm Help Jennifer Excel Discussion (Misc queries) 1 April 6th 05 10:57 AM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"