Monday, October 10, 2011

Adding Listview / Additional / ActiveX Control in Excel 2007 VBA

Adding Listview / Additional / ActiveX Control in Excel 2007 VBA

Question :

  How to add listview control in Excel 2007 VBA ?

 

Answer :  

Step 1 : Open Excel Run->Excel-> OK which will open New Excel


Step 2 : Right click on any sheet and Click View Code, which would open VBA Window



Step 3 : Right click on VBA Project  ->Insert -> UserForm , which would create New User Form



Step 4 : Default Toolbox contains only standard controls ,if you want additional / ActiveX controls then    you have add those controls manually



Step 5 : To Add Additional Controls manually select Tools menu->Click Additional Controls.. 



Step 5 : Choose any control that you want. for example select Microsoft ListView Control Version 6.0 and click OK



Step 6 : Now ListView Control is added in Toolbox




Step 7 : Now drag and place listview control in Form.


Step 8 :  Now you can start write your logic, Sample code here

              http://www.dailydoseofexcel.com/archives/2006/12/26/listview/

   

   

6 comments:

  1. What if the listview cannot be found in the list with controls?

    ReplyDelete
  2. In the step 5, I am not able to see the Microsift Listview control version 6.0. Can someone help on this. My OS is a 64 bit one. Thanks!.

    ReplyDelete
  3. In the step 5, I am not able to see the Microsift Listview control version 6.0. Can someone help on this. My OS is a 64 bit one. Thanks!.

    Warm regards
    Syamkumar Satheesan

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Just to add some more flavour to this ListView article, in case if anyone want to add this control through a VBA code, here is the code.

    http://officetricks.com/create-listview-in-vba-at-runtime/

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete