ProgressBar control cannot be load (Library not registered)

感情迁移 提交于 2019-12-11 12:12:39

问题


I am trying to add a progress bar to my User form but it is giving me "Library not registered" error. What I do is the following:

First I add the progress bar to the toolbox from Tools -> Additional controls

I choose the progressBar from Toolbox options and try to put it in the userForm

It gives me the error:

Apparently I have to add a Library from Tools -> References but I don't know which one is the one that is needed. I google it and I found that the MSCOMCTL.OCX could be the one that I needed but I add this one and I already have the same error.

Someone know which one is the correct?

EDIT

I put my references list so you can see what I am using:


回答1:


you need a reference to Microsoft Windows Common Controls 6.0 (SP6) to utilize the Progress bar. This should have been added when you selected the progress bar.

EDIT Register it.

open a command prompt with admin creds and type in

regsvr32 /s MSCOMCTL.OCX

EDIT#2 on a 64bit machine under admin creds in a command prompt.

cd C:\Windows\SysWOW64\
regtlib msdatsrc.tlb



回答2:


Do you have VB6 or some other programming language installed on the system? One that shipped with MS Windows Common Controls 6 (SP6)?

IIRC some of these controls can run on any system so long as they're properly installed and registered but can only be used to design/create code on a system where the language they shipped with is installed.

Others controls are compatible with VB but not VBA forms.

With very little extra work, you can create a reasonable progress bar from two text boxes or labels and a bit of code. Lighter weight, requires no installation/registration at the user end.



来源:https://stackoverflow.com/questions/20741650/progressbar-control-cannot-be-load-library-not-registered

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!