Working with ListView Control in Excel VBA

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 พ.ย. 2024

ความคิดเห็น • 130

  • @jmathew6988
    @jmathew6988 8 หลายเดือนก่อน +1

    Very useful video and nicely explained. Thanks! I am using VBA for almost 4 years now and I didn't know about Listview control until today. Information regarding Imagelist was a bonus. Thanks again!

    • @VBAA2Z
      @VBAA2Z  5 หลายเดือนก่อน

      Glad it was helpful!

  • @dovacmarlon7493
    @dovacmarlon7493 3 ปีที่แล้ว +2

    Hi Sir Pamai, from a reply to a comment, I gathered you are Indian, that's nice, your English is really good and doesn't have heavy Indian accent. Keep it up Sir, your VBA tutorials are very useful.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Hi Dovac, thanks for your kind words and I'm glad you find them useful.

  • @holieh5301
    @holieh5301 3 ปีที่แล้ว +4

    Your contribution to VBA community is commendable. Keep up the good work

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Much appreciated!

  • @garylyons7958
    @garylyons7958 3 ปีที่แล้ว +2

    Fantastic. ListView was the perfect control element I was looking for. (Combobox so limited!)
    This presentation was great to get up and going. Very well presented as a starter.
    Now to crack column sorting...
    Great, informative video.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Glad it was helpful!

  • @KevinAanensen
    @KevinAanensen ปีที่แล้ว +1

    Thank you for the fantastic ListView video. Would solve how to get sheet information and display it logically on the userform. Your videos are inspirational.

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      Glad to hear. Thanks for watching!

  • @dwsteyl
    @dwsteyl 3 ปีที่แล้ว +2

    Great work! This is very informative. I'm going to watch all your videos from the start of your channel! Thank you for sharing your knowledge!

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      Awesome, thank you!

  • @kingsoko5319
    @kingsoko5319 ปีที่แล้ว

    Best vba channel I came across just amazing

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      wow - thanks

  • @rainerstahl610
    @rainerstahl610 5 หลายเดือนก่อน

    with the formatting of numbers it seems to be a bit difficult in the listview-Box: partly the Excel formatting is working, partly it's not (colors, the whitespace-width "_)" in Excel) - which leads to closing brackets in your listview when numbers are positive. This made me check the video several times to realise, what's the problem...
    Anyhow, I learned a lot! Still I miss the opportunity to add multiple checkboxes in the listview - will need some work-arounds with images, I guess.
    Thanks a lot for your efforts and stay on!

  • @imranbhatti8580
    @imranbhatti8580 3 ปีที่แล้ว +2

    Hi
    Sorry, I could not properly listen to your name, but you are really awesome. Your VBA tutorials are far different from the other people teaching VBA. Can you please make a tutorial on creating Listgrid view as another VBA Expert (JKP) has created (i.e.hierarcicle )

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +2

      Hi Imran, I'm Lung Pamai :) thanks for your kind works
      I'll try and cover Listgrid too in future videos

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      Nice name. Sounds Chines.

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      I would wait for ListGrid Video.

  • @aNDy-qh1em
    @aNDy-qh1em 3 ปีที่แล้ว +1

    Sir, thank you so much! Very helpful even for earlier versions for excel. This control turns out to be an unexpectedly powerful one! Very often i have to populate listboxes from collections of classes. The weak point of the listbox is that the only way to fill listbox column headers is when you get data from sheet range as data source - it is not possible when you get data from elsewhere. The wokaround was to create additional listbox for fields - not very nice. With listview it seems that this tricky point is fixed! Also, the user can change the column width if needed!

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      Glad you found it useful. Thanks for watching.

  • @ekilunewmai7033
    @ekilunewmai7033 2 ปีที่แล้ว +1

    This is mind blowing. Is this available for access too?

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      Yes

  • @imranbhatti8580
    @imranbhatti8580 3 ปีที่แล้ว +2

    Hi Lung
    This control is nice with a lot of addtional feature over a ListBox, but sadly we cannot load data to it in one go as we can for ListBox i.e. ListBox1.List = arData (single/multidimensional). Isn't it?. But good for a smaller dataset I think.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      listview has RowSource property there should be a way to set this up perhaps creating an class / object

    • @imranbhatti8580
      @imranbhatti8580 3 ปีที่แล้ว

      Hope you would also create maybe a shorter video to load data to such controls in one go instead of looping.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      sure, I'll try it out and come back

  • @hoseal8048
    @hoseal8048 3 ปีที่แล้ว

    Excellent as usual. I have seen most of it from prior publish. Thanks

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Awesome! Thank you!

  • @kuksten1579
    @kuksten1579 3 ปีที่แล้ว +1

    thank you very much for detailed tutorial. nice pace too

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Glad you liked it

  • @stefanogattoCH
    @stefanogattoCH 3 ปีที่แล้ว

    Thank you, this is very useful!
    I came across the issue of not being able to sort numeric values in Listviews. Is there a work around you'd recommend?

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +2

      I normally stage data in Sheet or Array and sort them and then populate them

    • @stefanogattoCH
      @stefanogattoCH 3 ปีที่แล้ว

      @@VBAA2Z ok thanks. I’ll try that

  • @adrianl6409
    @adrianl6409 3 ปีที่แล้ว +1

    Thanks for sharing your knowledge and experience.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      My pleasure!

  • @kinga334
    @kinga334 3 ปีที่แล้ว +1

    Thanks Pamai. This is super useful

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      You're very welcome!

  • @nicolocascone8842
    @nicolocascone8842 ปีที่แล้ว

    Thanks, very helpful. Just one question regarding min 3:15 when you show userform2. It seems that every “cell” of the list view allows multiple lines. How do you implement that function?

    • @VBAA2Z
      @VBAA2Z  11 หลายเดือนก่อน

      that's the inbuilt feature

  • @Brad-fh2vn
    @Brad-fh2vn ปีที่แล้ว

    another incredible video thank you so much sir!

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      Glad you enjoyed it!

  • @benjaminf5731
    @benjaminf5731 ปีที่แล้ว +1

    thank you so much

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      Welcome 😊

  • @matnz7546
    @matnz7546 3 ปีที่แล้ว +1

    Thanks Pamai. Nice work

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      You're welcome

  • @amorbatna2725
    @amorbatna2725 ปีที่แล้ว

    بارك الله فبك

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      thanks for visit

  • @praveendhanasekar2555
    @praveendhanasekar2555 3 ปีที่แล้ว +1

    Can we have filter in the listview similar to access listview

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      You will have to create a custom filter.

  • @arikurita401
    @arikurita401 3 ปีที่แล้ว +1

    thanks for useful video!

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      You're welcome!

  • @hasbihadirahmanputra5340
    @hasbihadirahmanputra5340 2 ปีที่แล้ว +1

    Sir, is it possible to use 2 Database (or sheet) and then show those 2 Data to one list view (listview1)?

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      yes you can. You can join 2 tables or link sheets using lookup/index(Match

  • @FitnFabulousLife
    @FitnFabulousLife 2 ปีที่แล้ว +1

    If we use ListView control in a file and gives it to client, does client needs to install the Listview control as well on their machine?

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว +1

      You clients may have to install common controls

  • @brainservice6863
    @brainservice6863 3 ปีที่แล้ว +1

    Hi. your tutorials are very informative. I would like to have your version of Windows 7. Could you send me a link to download. Thank you.

  • @besirozmen3733
    @besirozmen3733 2 ปีที่แล้ว

    Hello, thank you so much for this video, I am having a problem and I hope you can help me, when I insert the small icons to control the height of the rows it shows a blank space in the first column, how do I prevent this from happening

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      You're most welcome.
      Make sure your source has data or icon is valid image type. Feel free to comment your code here.

  • @AKSHAYKUMAR-kh3oj
    @AKSHAYKUMAR-kh3oj 2 ปีที่แล้ว

    Can we make icons clickable to access on other page in multi-page

  • @dipankarroy5529
    @dipankarroy5529 2 ปีที่แล้ว +1

    Sir,
    I am using MS Office 2016 now.but the problem is that there is no Listview & Date picker option in the userform.
    I got Mscomtct2.ocx and Mscomctl from internet. I downloaded and installed the ocx file, after that there is Listview and Date picker file missing. how to solve ?

  • @roland9923
    @roland9923 3 ปีที่แล้ว +1

    Another great tutorial. Keep it up

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Thank you! Cheers!

  • @mrnimbus2556
    @mrnimbus2556 2 ปีที่แล้ว +1

    Is it possible to get data from sql server and will shown in listview in vba?

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      Yes, please check below video links
      th-cam.com/video/iTUTbonCDNs/w-d-xo.html
      th-cam.com/video/U1sQ1-Oa0fs/w-d-xo.html

  • @SuangSuanglee-vn2qr
    @SuangSuanglee-vn2qr ปีที่แล้ว

    This fantastic

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      thanks!

  • @sunnylokesh3500
    @sunnylokesh3500 3 ปีที่แล้ว

    Very helpful tutorials. Keep going

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Thanks a ton

  • @FitnFabulousLife
    @FitnFabulousLife 2 ปีที่แล้ว +1

    Does listview control works on MAC for excel??

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว +1

      unfortunately I am not Mac user. Please try posting in stackoverflow

  • @anandchaudhari901
    @anandchaudhari901 3 ปีที่แล้ว +1

    Sir, thanks............need more HELP on this listview,
    Like how to filter data with multiple criteria,
    how to add images infront of all employee name,
    sort coloums with both type numerical or alphabetical

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Best filter it from source or to keep it simplified you can your sorting keys created and have data loaded to array to prevent requiring data.
      Other videos which might help. th-cam.com/video/0TqlbXZyE3U/w-d-xo.html

    • @anandchaudhari901
      @anandchaudhari901 3 ปีที่แล้ว

      @@VBAA2Z dear sir waiting for more videos on listview

  • @mohammedalsarraj9963
    @mohammedalsarraj9963 3 ปีที่แล้ว +1

    Great review

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      thanks!

  • @sallu21m
    @sallu21m ปีที่แล้ว +1

    how to autoresize column width in listview ?? PLs share VBA code

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว +1

      this may help stackoverflow.com/questions/34138226/excel-vba-auto-resize-listview-columns

  • @ekilunewmai7033
    @ekilunewmai7033 2 ปีที่แล้ว

    Btw, thank you so much

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      No problem!

  • @rjdexceltutorial4986
    @rjdexceltutorial4986 3 ปีที่แล้ว +1

    Can u make a tutorial that the icon in list view is clickable?

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      thanks for suggestions. I'll review it

  • @otealiig5592
    @otealiig5592 2 ปีที่แล้ว +1

    Fantastic, Outstanding !!!!
    But i am facing one issue in li.subitems.add
    I am getting ... li.add.subitems .... Please Assist ... Thank you

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      Feel free to commend you code and error

  • @alializadeh8195
    @alializadeh8195 ปีที่แล้ว

    Thanks

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      you're most welcome!

  • @levelupexcelskill
    @levelupexcelskill 3 ปีที่แล้ว

    Thank you so much for sharing. I have a query . I am unable to format value into USD and another currency it converted only $#,##0.00.Could you please tell us how we format this type of currency. Requesting you to please make a video where we can sort A-Z and Small to Large it is possible to sort data.

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      What is the format you want to set?
      For sort it is best to load all data to array and sort it on runtime or sort it from source itself.

    • @levelupexcelskill
      @levelupexcelskill 3 ปีที่แล้ว

      @@VBAA2Z USD

  • @tinhnguyen08
    @tinhnguyen08 2 ปีที่แล้ว

    thanks so much !

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว +1

      You're welcome!

  • @kailashsoni676
    @kailashsoni676 ปีที่แล้ว +1

    How to apply adv filter on list view plz help

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      I'd suggest filter based on user input to sheet and reload the filtered data

  • @lordkailon
    @lordkailon 3 ปีที่แล้ว

    Hi There!!!, Great vídeos. Quesitos???,
    Can you send multiple emails from a listview or a listbox of a userform?

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Yes you can! check out below for email automation related videos.
      th-cam.com/play/PLo0aMPtFIFDprmb4MBozLAdCn3-1cnnDA.html

  • @hemantjshah
    @hemantjshah 3 ปีที่แล้ว

    How to select n focus to a perticular list row in listview?

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Hi Hemant, try something like this.
      ListView1.SetFocus
      ListView1.ListItems(2).Selected = True
      ListView1.ListItems(3).EnsureVisible

  • @ahmedzakaria11
    @ahmedzakaria11 3 ปีที่แล้ว +1

    Hi,
    How to install listview on my pc if there is not available on my PC ??????

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว +1

      please refer to this video
      th-cam.com/video/QGZqjUGhJ1Q/w-d-xo.html

  • @sefaelmas8501
    @sefaelmas8501 3 ปีที่แล้ว

    Thanks 🥰

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      You’re welcome 😊

  • @brenthalbach3645
    @brenthalbach3645 2 ปีที่แล้ว

    Can you please point me in the direction of how to add data FROM a listview to a database?
    I have been struggling for a couple days and cannot find anything online to get me going in the right direction.
    I am trying to add ALL column and row data. The listview has multiple columns and rows that I want to add to the Microsoft Sequel database.
    I would be very appreciative of your assistance.

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      This is a good tutorial as far as reading, writing to and from Listview.
      Once you're able to do that, check this videos to learn how to write to database th-cam.com/video/82IabW5_mao/w-d-xo.html

    • @brenthalbach3645
      @brenthalbach3645 2 ปีที่แล้ว

      @@VBAA2Z I am able to read and write to and from database with listview. The problem I have is when I try writing all the items to the database at one time…I only get the first item in the listview to write to db multiple times, same data not the second,third etc row data.
      I’m sure it has to do with items and su items but just can’t sort it out. I’ve watched all your vids on this, they are great info.

  • @alessandrolazzarini270
    @alessandrolazzarini270 ปีที่แล้ว

    Hi VBA A2Z, could you help me how to verify if no item is selected in a LV?

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      Please try below
      LV.SelectedItems.Count > 0

    • @alessandrolazzarini270
      @alessandrolazzarini270 ปีที่แล้ว

      @@VBAA2Z Already tried, but LV.SelectedItemS doesn't exist

  • @lollo4711
    @lollo4711 2 ปีที่แล้ว

    MS Listview may not be accessible on every client... and Version Number makes it easily incompatible. Or am I wrong?

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      There could be compatibility issues.
      Check this video: th-cam.com/video/QGZqjUGhJ1Q/w-d-xo.html

  • @ApprendreavecJADDI2023
    @ApprendreavecJADDI2023 ปีที่แล้ว

    How to add and activate control imagelist vba excel in office 365 64 bits in windows 10 64 bits

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว

      Please check here.
      th-cam.com/video/QGZqjUGhJ1Q/w-d-xo.html

  • @ApprendreavecJADDI2023
    @ApprendreavecJADDI2023 ปีที่แล้ว +1

    How to add and open hyperlink in ListView in VBA EXCEL ??? Can you help me with your sample code, video clip, or training course to solve this problem?

    • @VBAA2Z
      @VBAA2Z  ปีที่แล้ว +1

      this may help - pamaitech.com/add-a-hyperlink-in-a-listview-control-when-an-item-is-clicked/

    • @ApprendreavecJADDI2023
      @ApprendreavecJADDI2023 ปีที่แล้ว +1

      @@VBAA2Z thank you so much for help me.

  • @coolag74
    @coolag74 3 ปีที่แล้ว

    Can you help me with my task?

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      sure happy to guide you

  • @byteseq
    @byteseq 2 ปีที่แล้ว

    You should start this video with a HUGE WARNING about how this is useless for 64-bit Office!
    I have not been able to use ListView for more than 10 years because of this MS Fuckup.

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      This video is demo on Office 365, 64 Bit Excel.
      th-cam.com/video/QGZqjUGhJ1Q/w-d-xo.html

  • @limitone9564
    @limitone9564 2 ปีที่แล้ว +1

    why do I feel so stupid? :(

    • @VBAA2Z
      @VBAA2Z  2 ปีที่แล้ว

      Why :) ?

  • @TSHORYUKEN
    @TSHORYUKEN 3 ปีที่แล้ว +1

    Hello , in 16:10 is there a way to add checkbox on a specifix column ? i just add this line :
    With MENU.ListView2
    .CheckBoxes = True
    .ColumnHeaders(1).position =5
    End With
    Didn't work, only first column work :(

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      Yes, as discussed in video only first column can hold checkbox however you can move columns to desired location.

    • @TSHORYUKEN
      @TSHORYUKEN 3 ปีที่แล้ว

      @@VBAA2Z Thanks, but i think i have a bug : it writes me "position" instead of "Position"...

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      try and recheck if position itself is name of variable in your project.

    • @TSHORYUKEN
      @TSHORYUKEN 3 ปีที่แล้ว

      @@VBAA2Z got it : it was a bug , fixing when i start a new userform and listview 😉

    • @VBAA2Z
      @VBAA2Z  3 ปีที่แล้ว

      ok great!