Results 1 to 15 of 15

Combobox value defines Combobox Rowsource

Threaded View

onmyway Combobox value defines... 09-03-2013, 07:07 AM
Norie Re: Combobox value defines... 09-03-2013, 07:15 AM
onmyway Re: Combobox value defines... 09-03-2013, 07:23 AM
alansidman Re: Combobox value defines... 09-03-2013, 07:18 AM
Norie Re: Combobox value defines... 09-03-2013, 07:29 AM
onmyway Re: Combobox value defines... 09-03-2013, 07:38 AM
Norie Re: Combobox value defines... 09-03-2013, 07:47 AM
Norie Re: Combobox value defines... 09-03-2013, 07:41 AM
onmyway Re: Combobox value defines... 09-03-2013, 07:45 AM
onmyway Re: Combobox value defines... 09-03-2013, 07:52 AM
Norie Re: Combobox value defines... 09-03-2013, 08:04 AM
onmyway Re: Combobox value defines... 09-03-2013, 08:23 AM
Norie Re: Combobox value defines... 09-03-2013, 08:27 AM
onmyway Re: Combobox value defines... 09-03-2013, 08:40 AM
Norie Re: Combobox value defines... 09-03-2013, 08:57 AM
  1. #1
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Combobox value defines Combobox Rowsource

    Hi all, I need some help getting this code to work. I would like the value of Combobox1 to define the Combobox2 Rowsource.

    The basic concept works, except for adding the line of code:

    Me.ComboBox1.List = Sheet1.Range("ABC").Value
    to my UserForm_Initialize that already has existing functions in it.....

    Private Sub UserForm_Initialize()
    
       'My line I need to add
    
    '*************************************************
        Me.ComboBox1.List = Sheet1.Range("ABC").Value
    '*************************************************
        
        
        Dim LR As Long
        Dim myNum
        Dim WS As Worksheet
         
        For Each WS In ActiveWorkbook.Worksheets
            ListBox1.AddItem WS.Name
            
        Next
        
        Set WS = Nothing
        
        With Sheets("DataSheet - Fitness")
            LR = .Cells.Find("*", .Cells(Rows.Count, .Columns.Count), SearchOrder:=xlByRows, _
                    SearchDirection:=xlPrevious).Row
            If LR = 1 Then
                myNum = 1
                Me.GUID.Text = "ABC001" & Replace(Replace(Replace(Date & Time, ":", ""), "/", ""), " ", "")
            Else
                Me.GUID.Text = "ABC001" & Replace(Replace(Replace(Date & Time, ":", ""), "/", ""), " ", "")
               
            End If
    
        End With
           
    End Sub
    Appreciate your help!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Add RowSource to Userform ComboBox based on value on Another ComboBox
    By Baziwan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2012, 01:17 PM
  2. Way to populate combobox rowsource based on previous combobox value
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-08-2012, 12:50 AM
  3. Combobox: How to determine the location of the selected item if combobox has rowsource
    By ahsanzafar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2012, 03:24 PM
  4. Combobox rowsource
    By mike0123m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2009, 02:46 PM
  5. [SOLVED] Combobox rowsource
    By Marinos Andreou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-07-2006, 01:10 PM

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