vba 缺少 Microsoft 进度条控件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9374715/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 15:17:06  来源:igfitidea点击:

Microsoft Progress Bar Control is missing

windows-7excel-vbaprogress-barexcel-2010vba

提问by Sarika.S

I need to create the progress bar on a user form. For inserting progress bar, opened toolbox , right clicked on it and choose “Additional Controls”. (Alternatively, I could go up to the “Tools”/”Additional Controls” menu). But in that list of components, “Microsoft Progress Bar Control 6.0 (SP4)” is missing. I am using Microsoft Office 2010 and Windows 7. Please help me

我需要在用户表单上创建进度条。对于插入进度条,打开工具箱,右键单击它并选择“附加控件”。(或者,我可以转到“工具”/“其他控件”菜单)。但是在该组件列表中,缺少“Microsoft Progress Bar Control 6.0 (SP4)”。我使用的是 Microsoft Office 2010 和 Windows 7。请帮助我

回答by Siddharth Rout

Two suggestions :)

两个建议:)

1)Search your pc for MSCOMCTL.Ocx. If you find it then register it by clicking on Windows Start Button ~~> Run and then typing this text and pressing Enter

1)在您的电脑上搜索 MSCOMCTL.Ocx。如果找到它,则通过单击 Windows 开始按钮 ~~> 运行然后输入此文本并按 Enter 来注册它

regsvr32 C:\Windows\System32\MSCOMCTL.Ocx

I am assuming that the ocx is in C:\Windows\System32

我假设 ocx 在 C:\Windows\System32

If you don't have that then please download it from hereand then repeat the above steps.

如果没有,请从这里下载,然后重复上述步骤。

Once done, you will now be able to use the control.

完成后,您现在就可以使用控件了。

2)Please see this link. Sometimes you don't need a progressbar control ;)

2)请参阅此链接。有时您不需要进度条控件;)

Topic: VBA - Working with Scroll Bars - The most simplest way

主题:VBA - 使用滚动条 - 最简单的方法

Link: http://www.vbforums.com/showthread.php?t=511916

链接http: //www.vbforums.com/showthread.php? t= 511916

HTH

HTH

Sid

锡德

回答by Moimoi

You can make a makeshift loading bar whit any of the controlls you allready got, by simply useing width.

只需使用宽度,您就可以使用您已经获得的任何控件制作临时加载栏。

Example would be useing a label inside a frame, the frame will work as borders for it, so the top and left can be 0, then the total lenght of the frame works as max length for the label.. i think by now you see where im going whit this, basicly now all you gota do is come up whit a counter basicly a loop that counts up to max frame length :)

示例是在框架内使用标签,框架将用作它的边框,因此顶部和左侧可以为 0,然后框架的总长度作为标签的最大长度。我想现在你看到了我要去哪里,基本上现在你要做的就是拿出一个计数器,基本上是一个计数到最大帧长度的循环:)

But, like i said whit creativity, you can use buttons, the form itself, scrollbar basicly contains itself if you dont mind it beeing a unclickable (scroll) button moveing across.

但是,就像我说的创造力,你可以使用按钮,表单本身,滚动条基本上包含它自己,如果你不介意它是一个不可点击的(滚动)按钮移动。