View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Use a UserForm to preview data

Soniya..


create a defined name for the range e.g. "formSource"


set following properties of the combobox

..rowsource "formSource" (text)
..columncount 4
..columnwidths 0 pt;0 pt;;0 pt
..matchentry 0 matchentryfirst
,matchrequired true
..style 2 fmstylelist

then add following event in the code module of the form
With ComboBox1
TextBox1 = .List(.ListIndex, 0)
TextBox2 = .List(.ListIndex, 1)
TextBox3 = .List(.ListIndex, 3)
End With

suc6

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Soniya" wrote:

Hi all,

Is it possible to use a UserForm to preview data?

I have the folowing in a sheet

Account Branch RecNo Amount

abcd a 1 10
def b 2 15
abcd b 3 25
defg a 4 20

If I create a UserForm with a combobox for RecNo and
three TextBoxes for corresponding data, How can i code to
get the data on TextBox ?

TIA
Soniya