Filling Textboxes from Combobox selection
ok, thanks
--
Gary
"Tom Ogilvy" wrote in message
...
no. ws.rng would raise an error since there is no rng property of a
worksheet.
a range reference is a specific range on a specific worksheet in a specific
workbook
set rng = Activesheet.range("B9")
? rng.Address(0,0,xlA1,True)
'[Book1]Trip missed'!B9
rng.parent is the worksheet
rng.parent.parent is the workbook
? typename(rng.parent)
Worksheet
? typename(rng.parent.parent)
Workbook
--
Regards,
Tom Ogilvy
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
so are
ws.rng
and
rng.parent
the same?
--
Gary
"Tom Ogilvy" wrote in message
...
it is a reference to the worksheet that contains the range
--
Regards,
Tom Ogilvy
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
tom:
i've seen rng.parent a couple of times today. can you explain what it's
used for?
--
Gary
"Tom Ogilvy" wrote in message
...
dim rng as Range, idex as Long, rw as Long
With Combobox1
set rng = Range(.RowSource).Columns(1).Cells
End with
idex = .ListIndex + 1
End with
rw = rng(idex).row
Textbox1.Value = rng.parent.Cells(rw,6).Text
Textbox2.Value = rng.parent.Cells(rw,7).Text
--
Regards,
Tom Ogilvy
"Corey" wrote in message
...
When i select value from a list in a Combobox, how do i fill some
textboxes with other values
from the same row as the selected Combobox value.
EG.
If A10 was the selected value for the Combobox
How do i do this :
IE.
Textbox1.value = Combobox1.Offset(0,5).Value ? ' (A15)??
Corey....
|