• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

MS Flex Grid in VBA Form Control Toolbox

sumitbansal

Member
Hi,

Is there a way to get the famous MS Flex Grid in VBA Form as we do it in VB.Net? I was unable to find it in Add Control on the Control Toolbox.


Thanks,

Sumit.
 
You can try out following:


* Check if msflxgrid.ocx is available on your system.

* If not then download it.

* Register the msflxgrid.ocx by

[pre]
Code:
Put msflxgrid in system32 folder on C drive
Start command prompt
In command prompt write following command and then press ENTER:
regsvr32 msflxgrid.ocx
[/pre]
* Now in Visual Basic Editor in Excel insert a userform.

* Toolbox will appear with available controls

* Click on empty area on the toolbox and choose "Microsoft FlexGrid Control, version x.x"


Thenceforth, you can use it like any other standard ActiveX control.


Note: If you intend to deploy it across many PCs you will have to ensure that they have this control installed on their machines otherwise it will not work.


Hth,
 
Thanks for the post, it was really helpful...


One question though,

can we package this msflxgrid.ocx along with ms excel project so that whenever a new user opens the project file, this file gets automatically registered on his computer, iff it already is not present there??


Thanks,

Sumit
 
Hi,

After registering it successfully, when I tried to use it, it gave me an error message "the subject is not trusted for the specified action" and it would not add the grid in the form. Please help me with this.


Thanks,

Sumit.
 
I think this is known issue with MS FlexGrid. I have not used them before to be honest as Excel in itself is best grid. And on userforms I have used Listboxes.


Please see following threads:


http://social.msdn.microsoft.com/Forums/br/isvvba/thread/6d1c360d-084e-411d-b17f-e5d2ecb56e0f


http://www.tek-tips.com/viewthread.cfm?qid=1530759
 
Back
Top