Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default get values from combobox in excel.


Hi members,
I am not able to get the values corresponding to selection made i
combo box in excel sheet.

In macro , i am not able to retrieve corresponding values of combo bo
selection.

for eg:
Sub DropDown1_Click()
Select Case DropDown1.Value
Case 0 'Left Top
MsgBox "Left Top"

Case 1 'Left Center
MsgBox "Left Center"

Case 2 'Left Bottom
MsgBox "Left Bottom"

Case 3 'Right Top
MsgBox "Right Top"
End Select

End Sub

Here my doubt is how to identify the name of the combobox in excel.
After identifying the mname , how to retrieve values of eac
selection.

DropDown1.Value is not working!!

pls help..

Roshi

--
roshinpp_7
-----------------------------------------------------------------------
roshinpp_77's Profile: http://www.excelforum.com/member.php...fo&userid=3492
View this thread: http://www.excelforum.com/showthread.php?threadid=55638

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default get values from combobox in excel.

I assigned this macro to any/all of the dropdowns from the Forms toolbar and it
seemed to work ok:

Option Explicit
Sub testme()

Dim myDD As DropDown
Set myDD = ActiveSheet.DropDowns(Application.Caller)

With myDD
If .ListIndex 0 Then
MsgBox .List(.ListIndex)
End If
End With

End Sub


roshinpp_77 wrote:

Hi members,
I am not able to get the values corresponding to selection made in
combo box in excel sheet.

In macro , i am not able to retrieve corresponding values of combo box
selection.

for eg:
Sub DropDown1_Click()
Select Case DropDown1.Value
Case 0 'Left Top
MsgBox "Left Top"

Case 1 'Left Center
MsgBox "Left Center"

Case 2 'Left Bottom
MsgBox "Left Bottom"

Case 3 'Right Top
MsgBox "Right Top"
End Select

End Sub

Here my doubt is how to identify the name of the combobox in excel.
After identifying the mname , how to retrieve values of each
selection.

DropDown1.Value is not working!!

pls help..

Roshin

--
roshinpp_77
------------------------------------------------------------------------
roshinpp_77's Profile: http://www.excelforum.com/member.php...o&userid=34924
View this thread: http://www.excelforum.com/showthread...hreadid=556381


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combobox values Greg[_27_] Excel Programming 2 May 13th 06 07:29 PM
Two values in a combobox alvin Kuiper Excel Programming 2 February 23rd 06 06:55 PM
Combobox - use values in excel formula Nico Excel Worksheet Functions 1 February 2nd 05 09:22 AM
Fill values into a listbox matching selected values from a combobox Jon[_19_] Excel Programming 4 January 25th 05 04:25 PM
Excel/VBA - Synchronize combobox values Excel-erate2004[_10_] Excel Programming 4 May 20th 04 12:16 AM


All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"