使用对象浏览器中未列出的对象属性 [英] Using object properties that aren't listed in Object Browser

查看:140
本文介绍了使用对象浏览器中未列出的对象属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究VBA中对象属性和方法的底层结构。我刚刚读到,每个对象的所有属性和方法都列在开发人员框中的对象浏览器中。



我被提示看看的原因这是因为我使用的对象浏览器中未列出的方法。我使用:

 表格(Front face)。形状(Drop Down 12)。ControlFormat 

这样我可以使用.List来更改Shape。但是.ControlFormat不是对象浏览器中列出的属性/方法。



任何人都可以解释这个吗?

解决方案



它出现在我的 - 也许你正在寻找形状这是一个集合,而不是形状,这是实际对象?






详细信息:



形状 Shape 集合 - 因此形状具有与 Collection 对象相关的属性和方法。该集合中的每个项目都是一个 Shape 对象,它具有 Shape的属性和方法


I've been looking into the underlying structure of object properties and methods in VBA a bit more. I've just read that all properties and methods for each object is listed in the "Object Browser" in the developer box.

The reason why I was prompted to look at this was that I used a method that wasn't listed in the Object Browser. I used:

Sheets("Front face").Shapes("Drop Down 12").ControlFormat

This allowed me to then use .List to change the Shape. However .ControlFormat isn't a property/method listed in Object Browser.

Can anyone explain this?

解决方案

It appears in mine - perhaps you're looking for "Shapes" which is a collection, as opposed to "Shape" which is the actual object?


Detail:

Shapes is a collection of Shape objects - therefore Shapes has properties and methods that relate to a Collection object. Each item in that collection is a Shape object which has the properties and methods of a Shape

这篇关于使用对象浏览器中未列出的对象属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆