+ Reply to Thread
Results 1 to 8 of 8

Show UserForm from ComboBox

Hybrid View

  1. #1
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Show UserForm from ComboBox

    cfr the attachment
    Attached Files Attached Files



  2. #2
    Forum Contributor
    Join Date
    10-28-2011
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    114

    Re: Show UserForm from ComboBox

    Hmm doesn't seem to work for me..

    I have copied this code in the worksheet:

    Private Sub ComboBox1_Change()
    Select Case ComboBox1.ListIndex
        Case 0
          UserForm1.Show
        Case 1
          UserFormSecurity.Show
        End Select
    End Sub

    and this in the workbook:

    Private Sub Workbook_Open()
        For Each cp In ThisWorkbook.VBProject.VBComponents
            If cp.Type = 3 Then c01 = c01 & "|" & cp.Name
        Next
        Sheets(5).ComboBox1.List = Split(Mid(c01, 2), "|")
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1