• ComboBox issues (Excel XP)

    Author
    Topic
    #435609

    Hello,
    My problem is this, my combobox’s need to be easy to press using a touch screen, but at the moment the arrow part is jsut too small, i tried using the style 2, but the problem arises when the value has to be set to one outside of the list, either that, or it must be possible to select an item twice and still run the module if that item has been selected 2 times in a row. E.G. If i select Yes, a module is run and writes Yes in a list, if i select Yes again, it will not write it again into that list as it’s the same value.
    Any ideas? BTW i have tried the Listindex = Null and value = Null but it has an odd effect on the following modules it runs.

    Viewing 1 reply thread
    Author
    Replies
    • #1030041

      I have done a fix myself now, if someone has a better suggestion then i will take it up, i placed a large button over the drop down and used ComboBox1.DropDown , it works… however i notice you cannot ‘cancel’ the drop down by clicking elsewhere, you HAVE to choose an item, but that is acceptable.

    • #1030088

      Danny,

      Regarding your issue with making the SAME selection in a Combobox twice in a row:
      I have solved this problem by including code at the end of the ComboBox_Change event that resets
      the selection back to the original.
      Say that the list of Items is:

      Select
      Bananas
      Oranges
      Apples

      Then include code something like:

      Option Explicit
      Public CallingMyself As Boolean

      Private Sub ComboBox1_Change()
      If Not CallingMyself Then ‘ to avoid repetitive cylcling
      …..your code
      Range(“A1”).Select

      ‘Clear the selection box so I can make the same selection again
      CallingMyself = True
      Me.ComboBox1= “Select”
      CallingMyself = False

      End If
      End Sub

      HTH

    Viewing 1 reply thread
    Reply To: ComboBox issues (Excel XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: