Excel VBA Listbox MultiSelect To Fill Other ListBox - MultiSelectExtended Explanation

  Рет қаралды 31,459

ExcelVbaIsFun

ExcelVbaIsFun

Күн бұрын

Пікірлер: 29
@marioalbertohidalgobarrant5040
@marioalbertohidalgobarrant5040 Жыл бұрын
You explained it just at my Excel vba level, Thank You very much!
@samirbhowmik6916
@samirbhowmik6916 3 жыл бұрын
Hi @ExcelVbaIsFun: Your method helped me a lot... Could you please tell, how we can only keep the unique values in the ListBox2 if the column contains duplicates? thanks
@simonalqasab4301
@simonalqasab4301 2 жыл бұрын
Is there a way to transfer information from listbox 1 to listbox 2 with a number of columns
@thomasfergusen5144
@thomasfergusen5144 4 жыл бұрын
hello, great doings with listboxes but i didnt see any episode about 'listview' controls in your channel. what do you think about to introduce the listviews to thefollowers. the mothod you use is very useful for knowledge transfusion, thank you very much...
@1936Rock
@1936Rock 5 жыл бұрын
Really enjoying your video's. Thanks for making the explanations easy to understand.
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
So glad it's easy to follow and that it helps!!
@VaultRaider
@VaultRaider 5 жыл бұрын
You could also store the selected items from the first listbox in an array. Then you can do just one loop through the data to add any that match the array. This would be more efficient for longer lists and more values are selected.
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
Love it! There are so many ways to skin the cat, for sure. That is a fantastic idea, VaultRaider, thanks! :)
@VaultRaider
@VaultRaider 4 жыл бұрын
@F. Javier Colunga Hey. Here is an example. Dim selectedVals() As Variant 'the array that will store the selected items For selitem = LBound(Me.ListBox1.List) To UBound(Me.ListBox1.List) If Me.ListBox1.Selected(selitem) = True Then If (Not Not selectedVals) = 0 Then 'if the array is not yet initialized, then set the bounds first ReDim Preserve selectedVals(0 To 0) Else: ReDim Preserve selectedVals(0 To UBound(selectedVals) + 1) 'if the array is already initialized, then resize it by 1 and preserve the items End If selectedVals(UBound(selectedVals)) = Me.ListBox1.List(selitem) ' add the item into the last position of the array End If Next selitem If (Not Not selectedVals) = 0 Then Exit Sub 'check if the array contains any items. If not then exit 'loop throught the sheet For X = 2 To lastRow For i = LBound(selectedVals) To UBound(selectedVals) ' go through each array item and check if the worksheet value matches the array item If selectedVals(i) = Sheet1.Cells(X, "a") Then Me.ListBox2.AddItem (Sheet1.Cells(X, "b")) 'add it if it matches Next i Next X
@ElectromecanicaIndustrial
@ElectromecanicaIndustrial 2 жыл бұрын
thanks for sharing, very good explanation
@eCabinetstipsandtricks
@eCabinetstipsandtricks 5 жыл бұрын
Thanks, Dan. Great explanation
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
Thanks eCabinets tips and tricks!!
@shakhobiddinnakiev6767
@shakhobiddinnakiev6767 Жыл бұрын
Thank you bro!!!
@zoltanfustos2275
@zoltanfustos2275 4 жыл бұрын
great work, congrats! :) do you have any idea, how to send the selected values from listbox into separate textboxes? for example, you can select only maximum 6 items from listbox, then send to 6 textboxes for each item separately. thank you, have a reat day!
@ChuckJaeger
@ChuckJaeger 5 жыл бұрын
I'd figure you would want to explicitly declare variables and their type. What's the rationale for not using "Option Explicit" in your module?
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
Hi Chuck, I will generally declare Objects, such as worksheets, workbooks, charts, or any other controls/objects that have helpful intellisense dropdown menus once declared. I find this helpful in coding. I often find myself running a macro in Break mode (tapping F8 slowly) and making changes on the fly while the macro is actually running so I can see all the variable values, control values and get an overall idea of what's going on in order to make tweaks. This includes adding variables in the mix periodically for experimenting and although declaring the variable only takes a tiny bit of extra time, sometimes Excel will also force the macro to reset in order for the new declaration. I find this terribly annoying personally. There are speed tests online that prove that declaring all variables explicitly can speed up your code if you're running a kajillion iterations in a loop, so I'm all for it, when I know it will increase the speed. My macros almost always run in a fraction of a second, so with modern hardware, I rarely find this to be an issue. If it helps you to do so, it's a fine idea, my friend. Thanks so much for your comments and for watching! :) Dan
@Dopeboyz789
@Dopeboyz789 5 жыл бұрын
Do you know how to combine formulas together
@krn14242
@krn14242 5 жыл бұрын
Thanks Daniel.
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
Thanks Kev!
@osamabeskales2187
@osamabeskales2187 4 жыл бұрын
how can i sum all values in the listbox if the listbox is (Multiselected) ?
@plsm5882
@plsm5882 4 жыл бұрын
It'd be really great if you could do a similar video but one where the pins could not only be selected and shown, but also selected and edited. I haven't been able to find that lesson anywhere...
@kiranjagadale7532
@kiranjagadale7532 5 жыл бұрын
Hi, I have learnt VBA with help of your lot of video, I need one help, I have design one USERFORM based file for reporting Safety related incident and I have share and given access to users using Sharepoint. when multiple users click on the submit button, data gets overwrites and only one data gets saved from userform to the background sheet. requesting you, please let me know how multiple users submit data same time and excel automatically select next row if multiple users are there and data cannot get overwrites
@wayneedmondson1065
@wayneedmondson1065 5 жыл бұрын
Me.LikesIt haha!! Thanks for the tip on fmMultiSelectExtended. Thumbs up!
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
I'll see your thumbs up and raise you a heart! :) Thanks for the fun comments!
@recepbas9842
@recepbas9842 5 жыл бұрын
Perfect.
@dario7888
@dario7888 Жыл бұрын
your intro gave me a heart attack 😅
@KamalKumar-rr1tw
@KamalKumar-rr1tw 5 жыл бұрын
B-)
@ExcelVbaIsFun
@ExcelVbaIsFun 5 жыл бұрын
Thanks for the comment!!
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
Listbox Selection To Fill Other Listbox From Sheet Entries
12:46
ExcelVbaIsFun
Рет қаралды 21 М.
Excel VBA Userform with Vlookup
8:43
Online Pc Learning
Рет қаралды 334 М.
Dependent Combo Boxes with Advanced Filter - Excel VBA
10:48
Computergaga
Рет қаралды 54 М.
VBA Code Excel Listbox Multiselect Get Values
7:56
Haritha Computers & Technology
Рет қаралды 9 М.
Searchable Dropdown for VBA UserForms(Add in 30 Seconds)
8:38
Excel Macro Mastery
Рет қаралды 65 М.
Next Empty Row Trick in Excel VBA & Macros
10:36
TeachExcel
Рет қаралды 58 М.
I Built a Modern Listbox UI for Excel VBA
14:13
Excel Macro Mastery
Рет қаралды 13 М.
Create Dependent Combo Boxes on a Userform - Excel VBA
8:47
Computergaga
Рет қаралды 58 М.
Complete report in Excel with just ONE formula!
13:13
Excel Off The Grid
Рет қаралды 13 М.