You explained it just at my Excel vba level, Thank You very much!
@samirbhowmik69163 жыл бұрын
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
@simonalqasab43012 жыл бұрын
Is there a way to transfer information from listbox 1 to listbox 2 with a number of columns
@thomasfergusen51444 жыл бұрын
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...
@1936Rock5 жыл бұрын
Really enjoying your video's. Thanks for making the explanations easy to understand.
@ExcelVbaIsFun5 жыл бұрын
So glad it's easy to follow and that it helps!!
@VaultRaider5 жыл бұрын
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.
@ExcelVbaIsFun5 жыл бұрын
Love it! There are so many ways to skin the cat, for sure. That is a fantastic idea, VaultRaider, thanks! :)
@VaultRaider4 жыл бұрын
@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
@ElectromecanicaIndustrial2 жыл бұрын
thanks for sharing, very good explanation
@eCabinetstipsandtricks5 жыл бұрын
Thanks, Dan. Great explanation
@ExcelVbaIsFun5 жыл бұрын
Thanks eCabinets tips and tricks!!
@shakhobiddinnakiev6767 Жыл бұрын
Thank you bro!!!
@zoltanfustos22754 жыл бұрын
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!
@ChuckJaeger5 жыл бұрын
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?
@ExcelVbaIsFun5 жыл бұрын
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
@Dopeboyz7895 жыл бұрын
Do you know how to combine formulas together
@krn142425 жыл бұрын
Thanks Daniel.
@ExcelVbaIsFun5 жыл бұрын
Thanks Kev!
@osamabeskales21874 жыл бұрын
how can i sum all values in the listbox if the listbox is (Multiselected) ?
@plsm58824 жыл бұрын
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...
@kiranjagadale75325 жыл бұрын
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
@wayneedmondson10655 жыл бұрын
Me.LikesIt haha!! Thanks for the tip on fmMultiSelectExtended. Thumbs up!
@ExcelVbaIsFun5 жыл бұрын
I'll see your thumbs up and raise you a heart! :) Thanks for the fun comments!