Results 1 to 8 of 8

Selective values to fill combobox

Threaded View

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Selective values to fill combobox

    I need to show values in combobox that have no values to the left of them. It is a calendar with dates as the first column and then either events or blanks in the next column. For my form I want only the dates with blanks to show in the combobox. So far I have this code, but I'm having trouble adding a loop as it makes excel crash. I would then need code to input an event to the sheet next to a date (I have added a textbox to the form to do this). This is my code so far:

    Sub BookAPartyButton_click()
    BookAParty.Show
    Dim i As Integer
    Dim w As Worksheet
    Set w = Worksheets("Calender")
    
     With BookAParty.ComboBox1
      i = 3
       If w.Cells(i, 2) = "" Then
           .AddItem w.Cells(i, 1)
           i = i + 1
           
    End If
    End With
    End Sub
    Please help!
    Last edited by davesexcel; 12-27-2012 at 12:58 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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