Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Userform combobox dropdown question

Hi TP

Not exactly sure what your aiming for here but if you don't want the
user to be able to change the value of the combobox you could just set
it to be locked use code something like

ComboBox1.List = Array("", "blah", "BLah", "BLAH")
ComboBox1.ListIndex = 3
ComboBox1.Locked = True

will lock the combobox to show the value BLAH

hope this helps you out

S



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Userform combobox dropdown question


"Incidental" wrote in message
oups.com...
Hi TP

Not exactly sure what your aiming for here but if you don't want the
user to be able to change the value

Thanks for trying to help. All I'm really trying to do is to get the
combobox to retract after a selection is made. At the moment you have to
click the selection twice - onced to select and then again to shrink the
list down to sized again. Then you have to click something else on the form
to deselect the combobox in order for any of the other buttonsit to work.
Not very user friendly...


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Userform combobox dropdown question

Hi there

It is early in the morning here and I have read your post a few times
but I still don't understand why don't you post a bit of you code and
some descriptions of what controls are called and I will have a look
see what I can figure out, can't promise I will be able to do anything
but I will give it a go for sure.

S



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default Userform combobox dropdown question

Many thanks. I'm most grateful.

This is in a userform combobox with a media player object. The combobox
selects a phrase (eg "start of movie scene two") linked to a number which
tells the media player where to start playing the video from. But the list
then sits in front of the video unless you click on the combobox list again
to get rid of it. And then you have to click on it a third time to deselect
it completely and allow access to other shapes and media player controls. I
want to get rid of the need for that second and third click.

Private Sub Combobox1_change()


With Me.ComboBox1
If .ListIndex < 0 Then
Beep
Else
'pick out the second column
myVar = .List(.ListIndex, 1)

'show mediaplayer at the correct position
MP.CurrentPosition = myVar


End If
End With

' here follow a few failed attempts to get the combobox to retract
again after the previous command....

' DropDowns("Drop Down 1").Select
'Selection.Delete

' wih Me.DropDowns("drop down 1")
' .Visible = msoFalse
' End With

' With Me.Shapes("Drop Down 1")
' Selection.Delete
'End With

'ComboBox1.DropDown = false


End Sub

and

Private Sub UserForm_Initialize()

Dim myRng As Range


With ThisWorkbook.Worksheets("sheet2")
'defines the contents of the listbox in ff and a linked value in fg
Set myRng = .Range("ff1:fg" & .Cells(.Rows.Count,
"ff").End(xlUp).Row)
End With

With Me.ComboBox1
.ColumnCount = myRng.Columns.Count
.List = myRng.Value
.ColumnWidths = "33;0"
End With


"Incidental" wrote in message
oups.com...
Hi there

It is early in the morning here and I have read your post a few times
but I still don't understand why don't you post a bit of you code and
some descriptions of what controls are called and I will have a look
see what I can figure out, can't promise I will be able to do anything
but I will give it a go for sure.

S




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
Userform combobox dropdown question Incidental Excel Programming 0 May 23rd 07 01:32 PM
Userform combobox dropdown question teepee Excel Programming 0 May 23rd 07 11:20 AM
Yet another userform combobox question teepee Excel Programming 4 May 17th 07 10:03 AM
Userform combobox question teepee Excel Discussion (Misc queries) 2 May 17th 07 09:22 AM
Userform combobox question teepee Excel Discussion (Misc queries) 20 May 16th 07 09:42 AM


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

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

About Us

"It's about Microsoft Excel"