Excel用户形式变量 - 可以找到声明或初始化的位置
我正在使用供应商的专有Excel加载项和ActiveX Control(OCX文件)。在试图使其在64位办公室工作时,我发现有一个变量,我们称其为ABC,TypeName说的是,可以说是ABC_DEF。这就是ActiveX控件的Excel名称。奇怪的是,我找不到声明或初始化变量的任何地方 - 根据VBA的发现,在项目中没有列出ABC_DEF带有ABC名称的视觉对象,我已经检查了代码中对ABC的所有引用。然而,它在整个代码中都用作中央对象/变量,因此显然是在某个地方初始化的 - 直到以64位Excel运行,而突然不突然。
我已经尝试过
Dim ABC As new ABC_DEF
Set ABC = New ABC_DEF
哪个运行,但是然后不如预期的那样(基础ActiveX控件在调用时返回错误值)。
在哪里可以宣布或初始化?
I'm working with a vendor's proprietary Excel add-in and ActiveX control (an ocx file). In trying to get it to work in 64-bit Office, I discovered that there's a variable, let's call it ABC, that TypeName says is, let's say ABC_DEF. That's the Excel name of the ActiveX control. Weird thing is, I can't find anywhere where the variable is declared or initialized - according to VBA's find, ABC_DEF isn't listed in the project anywhere (nor is the ActiveX control's filename), the form's object does not appear to have a visual object with the name ABC, and I've examined every reference to ABC in the code. Yet it's used throughout the code as the central object/variable, so clearly it's initialized somewhere - until run in 64-bit Excel, when it suddenly isn't.
I've tried
Dim ABC As new ABC_DEF
Set ABC = New ABC_DEF
which runs, but then doesn't behave as expected (underlying ActiveX control returns an error value when called).
Where could this be declared or initialized?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它是对用户形式的控件,将高度设置为0。在VBA窗口中,在“属性”窗口中,下拉菜单使我可以选择它并设置其高度。显然,作为控件,它自动将其作为用户形式初始化的一部分进行初始化。
谢谢,用户18521918。
It was a control on the userform, with the height set to 0. In the VBA window, in the Properties window, the dropdown allowed me to select it and set its height. Apparently, being a control, it's automatically initialized as part of the userform's initialization.
Thank you, user18521918.