ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   double click option in listbox outputs to cell in excel 97 ! (https://www.excelbanter.com/excel-programming/366918-double-click-option-listbox-outputs-cell-excel-97-a.html)

spyrule

double click option in listbox outputs to cell in excel 97 !
 

Hello,

First off... The solution has to work in excel 97 !

I am having a little trouble trying to figure this out.
I have been able to get a simple listbox, to get a range of data from
another worksheet in the same workbook, and it works just fine.

However, my issue where I'm stumped, is if I could double click on a
single option and it would output that same option to a specific cell
in the
same worksheet as the listbox ?

Thank you VERY much in advance,

spyrule. :confused:


--
spyrule
------------------------------------------------------------------------
spyrule's Profile: http://www.excelforum.com/member.php...o&userid=25489
View this thread: http://www.excelforum.com/showthread...hreadid=560541


Norman Jones

double click option in listbox outputs to cell in excel 97 !
 
Hi SpyRule,

Try:

'=============
Private Sub ListBox1_DblClick(ByVal _
Cancel As MSForms.ReturnBoolean)
Me.Range("A1").Value = Me.ListBox1.Value
End Sub
'<<============

Or, using the simple change event:

'=============
Private Sub ListBox1_Change()
Me.Range("A1").Value = Me.ListBox1.Value
End Sub
'<<=============

---
Regards,
Norman



"spyrule" wrote in
message ...

Hello,

First off... The solution has to work in excel 97 !

I am having a little trouble trying to figure this out.
I have been able to get a simple listbox, to get a range of data from
another worksheet in the same workbook, and it works just fine.

However, my issue where I'm stumped, is if I could double click on a
single option and it would output that same option to a specific cell
in the
same worksheet as the listbox ?

Thank you VERY much in advance,

spyrule. :confused:


--
spyrule
------------------------------------------------------------------------
spyrule's Profile:
http://www.excelforum.com/member.php...o&userid=25489
View this thread: http://www.excelforum.com/showthread...hreadid=560541





All times are GMT +1. The time now is 01:31 AM.

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