View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Carlos Carlos is offline
external usenet poster
 
Posts: 84
Default User Form Vlookup help?

Joel,

thanks for your help, but i have trouble retrieving the data from the "Data"
worksheet, to display it in the User Form, do you have a VBA code to do this?

thanks for your help.



"Joel" wrote:

Carlos: usually odo this code in the main VBA module

Public Finished
sub main()
Finish = false


do while Finish = False

userform1.show



loop

end sub

I then add a command buttons to my userform to indicate when I'm finished
which I make public so it recognizes the finish variable

Sub CommandButtonDone_Click()

Finish = True
UserForm1.Hide

End Sub

You can then have the combobox hide the user form (returns to main sub) when
any actions are taken and havve the main code make the modifications to the
worksheet.



"Carlos" wrote:

I have 3 sheets in my file.

1. "Data" , in this one i have the employee information as follow:
A B C
ID NAME CODE
1060051 CHRIS ADAMS 1112
1060101 JOHN SMITH 9875

2. "Menu" i have the buttons with macros to bring up the User Form that i
created previously

3. "Report" In which i have 4 colums , A=ID, B=NAME,C=CODE , D= CITY

So i have a User Form in there I have 1 comobox with the user id in which
you choose the id from a dropdown list, and then i have 3 text boxes, with
the NAME, CODE and City, and one command button which says ADD

Here is what i wanna do, as soon as i choose an ID number, i want the in
the NAME textbox and CODE textbox to bring the actual information from
"Data" worksheet from the ID I chose, and then I will just input the City
manually in Textbox City, and the push the command button ADD, and all this
information (the 4 textboxes) goes to the worksheet "Report".

This is so i can built a report easily.

Anyone can help me.

Thanks !