Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-23-2018, 02:20 PM
NoSparks NoSparks is offline Fill userform, combobox and frame based on data from multiple worksheets Windows 7 64bit Fill userform, combobox and frame based on data from multiple worksheets Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Had no idea how to alpha sort the dictionary keys.
My buddy 'Google' lead me to this which seems to do the trick.



Replace
Code:
'populate combobox
cboFYList.List = Application.Transpose(dic.keys)
with
Code:
  ' Sort The Unique Values
    Uniques = dic.keys
    With CreateObject("System.Collections.ArrayList")
        For X = LBound(Uniques) To UBound(Uniques)
            .Add Uniques(X)
        Next
        .Sort
        Sorted = .ToArray
    End With
  
  ' Populate Combo with Sorted Uniques
  cboFYList.List = Sorted
You'll also need to declare the additional variables near the beginning along with the other Dim statements
Code:
Dim X As Integer, Uniques As Variant, Sorted As Variant
Reply With Quote
  #2  
Old 04-24-2018, 05:28 AM
Divinedar Divinedar is offline Fill userform, combobox and frame based on data from multiple worksheets Windows 7 64bit Fill userform, combobox and frame based on data from multiple worksheets Office 2010 64bit
Novice
Fill userform, combobox and frame based on data from multiple worksheets
 
Join Date: Jun 2016
Posts: 21
Divinedar is on a distinguished road
Default Fill userform, combobox and frame based on data from multiple worksheets

OMG Thank you so much that works perfectly.

Now my next endeavor is to populate the text boxes on the userform. They have to populate from each worksheet to each frame based on the year and be able to update each worksheet with new input.

Thank you so much for your help. I'm learning more and more everyday.
Reply With Quote
Reply

Tags
combobox, frame, userform

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill userform, combobox and frame based on data from multiple worksheets Summing data from multiple worksheets in a workbook and placing into another worksheet safrac Excel 17 10-04-2022 12:21 PM
Merging 2 different cells containing IF formula & change in cell values based on multiple time frame jay_excel Excel 0 07-29-2017 11:04 PM
Excel to Word data import based on UserForm entry jhancock1994 Word VBA 8 05-16-2017 04:41 PM
Fill userform, combobox and frame based on data from multiple worksheets Using combobox to pass data from an Excel spread sheet to text boxes on userform Stewie840 Word VBA 14 12-17-2015 10:13 PM
Fill userform, combobox and frame based on data from multiple worksheets Conditional color fill based on presence of data avanderh Excel 11 07-28-2011 09:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft