• 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.

List View Control in VBA [SOLVED]

vijay.vizzu

Member
Dear all,


I have inserted a Listview control in a form, but whenever i click custom option in properties window then it gives an error " class not registered"


i m using excel 2007


Please help me to resolve this
 
Hi Vijay ,


I assume this is based on the file MSCOMCTL.OCX , which on my computer is in :


..Windowssystem32


folder.


If this is so , and the control is not registered , follow the procedure given here :


http://office.microsoft.com/en-in/excel-help/add-or-register-an-activex-control-HP010236683.aspx


Narayan
 
It seems bizarre that that file has gone missing or been corrupted as it is installed by default when you install Excel


Doing an Install on Excel should give you the option to Repair the installation, that will also fix it


You may also want to do a good virus scan, just in case!
 
Did you try to repair Excel?

Did you see if the file is referenced in VZbA

Goto VBA, tools, references

Check that the file above is referenced
 
According to this link on Mark Dagosta's site you need to register a dll called Msstkprp. Make sure you're running as a local administrator when you register it:

http://markdagosta.com/tag/listview/

Clicking the "(Custom)" property of the ListView in order to use the graphical interface for defining columns, you may see a “Class Not Registered” error. This is something you’ll more commonly see with Windows Vista and Windows 7 and is caused by a missing or un-registered DLL called Msstkprp.dll. Do a search for this to get the details of how to download and register it.
 
Dear All


Sorry for delay in replying


@NARAYANK991: I can't able to upload the file, becoz the sharing & storing sites are blocked in my office

@Hui: I can't able do replaring, becoz it's an office system, admin rights not provided

@Colin Legg: I have downloaded that dll, but can't register, gives error and the link provided by you, not accessible in my office. Can you please share the infomration


Regards

Vijay
 
Hi Vijay ,


I do not know what other possibilities are available ; as a first step I would like to ask you whether all this is just a learning experience , or is this listview control part of a project you are working on.


Either way , do you really need to access the Custom properties ?


In the event that no further progress is possible , can we look for an alternative ?


What is it that you are trying to achieve , and is the listview the only option available ?


In case you want to send me the file , you can do so at narayank1026 [at] gmail [dot] com.


Narayan
 
Hi Vijay,


The relevant information on the link was quoted in my last post.


If you are not a local administrator then you'll need to ask your IT department to register the dll for you. (Even if you are, perhaps you should ask them to do it because company policy might not allow you to download dlls yourself?).


If you are an administrator and it is okay for you to download dlls yourself, then share with us the full error message, where you downloaded the dll from, the exact process you used to try to register it, and what operating system you have (eg Win7 32-bit), and then we might get some ideas on what the problem is. Without all of this information it is hard to suggest an answer.


Regards,

Colin
 
@Narayank991: both learning and part of my vba project. The reason is to access custom properties is, by run time i can add headers but i need to fix it, so i need custom properties and secondly, i joined chandoo's VBA classes, in that one tutorial explained about list view control, he shown me the custom properties. And my requriement is, in that listview control i want to display the records which the user entering in the textboxs. I will send the file to you later on.


@Colin Legg: i have the adminstrator rights, i am getting the below error while registereing the registry


The module "C:windowssystem32msstkprp.dll" failed to load


Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files


The specified module could not be found


Vijay
 
Okay, it sounds like a file the msstkprp dll depends upon is missing. I'll have to google for that. In the meantime, what operating system do you have and is it 32 or 64 bit?
 
Hi Vijay ,


In that case , follow the procedure given here :


http://support.microsoft.com/kb/188331


In case you do not have the Visual Basic CD , you can easily download the file from the Internet.


Narayan
 
Dear Colin Legg


Sorry for delay in replying


I am using window7 64bit and msoffice 2007


Dear Narayank


I already read this, before posting this problem in this forum.
 
Ah, that would explain it then. Since your OS is 64-bit but the msstkprp.dll is a 32-bit component, you need to copy and register it in
Code:
C:WindowsSysWOW64 instead of [code]C:WindowsSystem
.


NB. Use the C:WindowsSysWOW64regsvr32.exe[/code] to register it.

Google for how to register 32-bit dll on 64-bit Windows for further info.
 
Dear Colin Legg/Narayank/Hui


Thank you so much to put your efforts in my problem. Finally Colin Legg solution worked better, and now the custom properties window opens.


Once again thanks to all of you.


Regards

Vijay
 
Back
Top