Results 1 to 3 of 3

Loading comboboxes in multipage from worksheet

Threaded View

  1. #1
    Registered User
    Join Date
    08-16-2022
    Location
    Australia
    MS-Off Ver
    365
    Posts
    63

    Loading comboboxes in multipage from worksheet

    Good morning all.

    Having issues with loading multiple pages of a multipage from a single worksheet.
    the below is the code i am attempting to use, along with the attached workbook. The particular part i am trying to work with is the "AssetsUserform" with combobox3_Change(), once this is completed, the end goal is the click the Assets button on the dashboard, search the database and it auto populates all the pages of the multipage.

    Please also note that there is a combobox50 on the service history page of the multipage that i will need to work.

    Private Sub ComboBox3_Change()
    For j = 1 To UBound(ary1)
    
    If ary1(j, 1) = Me.ComboBox1.Value And ary1(j, 2) = Me.ComboBox2.Value And ary1(j, 3) = Me.ComboBox3.Value Then
    AssetsMultiPage.Value = 0
    For col = 1 To 18
    Me.Controls("TextBox" & col).Value = ary1(j, col)
    Next col
    rowctr = j
    Exit For
    End If
    Next j
    
    If ary1(j, 1) = Me.ComboBox1.Value And ary1(j, 2) = Me.ComboBox2.Value And ary1(j, 3) = Me.ComboBox3.Value Then
    AssetsMultiPage.Value = 1
    For col = 19 To 45
    Me.Controls("TextBox" & col).Value = ary1(j, col)
    Next col
    rowctr = j
    Exit For
    End If
    Next j
    
    If ary1(j, 1) = Me.ComboBox1.Value And ary1(j, 2) = Me.ComboBox2.Value And ary1(j, 3) = Me.ComboBox3.Value Then
    AssetsMultiPage.Value = 1
    For col = 19 To 45
    Me.Controls("TextBox" & col).Value = ary1(j, col)
    Next col
    rowctr = j
    Exit For
    End If
    Next j
    
    If ary1(j, 1) = Me.ComboBox1.Value And ary1(j, 2) = Me.ComboBox2.Value And ary1(j, 3) = Me.ComboBox3.Value Then
    AssetsMultiPage.Value = 1
    For col = 46 To 56
    Me.Controls("TextBox" & col).Value = ary1(j, col)
    Next col
    rowctr = j
    Exit For
    End If
    Next j
    
    If ary1(j, 1) = Me.ComboBox1.Value And ary1(j, 2) = Me.ComboBox2.Value And ary1(j, 3) = Me.ComboBox3.Value Then
    AssetsMultiPage.Value = 1
    For col = 57 To 59
    Me.Controls("TextBox" & col).Value = ary1(j, col)
    Next col
    rowctr = j
    Exit For
    End If
    Next j
    
    AssetsMultiPage.Value = 0
    Me.TextBox4.SetFocus
    End Sub
    Cheers
    Attached Files Attached Files
    Last edited by Danielt949; 07-21-2023 at 09:25 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Loading worksheet names into cells in another worksheet.
    By Alac61 in forum Excel General
    Replies: 14
    Last Post: 03-12-2015, 11:26 AM
  2. Userform:Filter Cascading Comboboxes initially triggered by multipage index
    By Gal403 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2014, 04:35 AM
  3. [SOLVED] Loading a Table in a worksheet from another worksheet by using a drop down list
    By zicitron in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2013, 03:50 AM
  4. Counting ComboBoxes on a worksheet
    By Mervil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2010, 02:58 PM
  5. Loading Comboboxes and textboxes for Find and replace
    By insanity66 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-04-2009, 07:17 PM
  6. Add texbox to Multipage on worksheet
    By Lucifix in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2006, 02:36 AM
  7. Tabulating on worksheet's comboboxes
    By bernardoafs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2005, 10:51 AM

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