ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Offset & Combobox's returned Value (https://www.excelbanter.com/excel-programming/286218-offset-comboboxs-returned-value.html)

Anat Sn

Offset & Combobox's returned Value
 
I have a combobox on a Userform.
The form is supposed to display a bunch of details
describing the Item selected in the Combobox (the data is listed in
a worksheet ,of course).
How do i refer to the C e l l
containg the data the user chose?
I will appriciate your response
T h a n k s in Advance
Anat

Tom Ogilvy

Offset & Combobox's returned Value
 
If the combobox is filled using the rowsource property then

Dim rng as Range
set rng = Range(combobox1.rowsource)(combobox1.listindex+1)
' or
set rng = range(combobox1.rowsource).offset(combobox1.listin dex)
msgbox rng.Address & " - " & rng.Value

--
Regards,
Tom Ogilvy


Anat Sn wrote in message
om...
I have a combobox on a Userform.
The form is supposed to display a bunch of details
describing the Item selected in the Combobox (the data is listed in
a worksheet ,of course).
How do i refer to the C e l l
containg the data the user chose?
I will appriciate your response
T h a n k s in Advance
Anat





All times are GMT +1. The time now is 04:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com