Tag: 对象的

VBA类具有属性的属性

我试图build立一个基本上描述一个地理空间条件语句的类,其中一个参数是高度。 海拔高度有4个属性,如最小,最大,单位,反转,我试图使类支持2层属性。 IE Dim blah as qClass Set blah = New qClass blah.Altitude.Min = 100 这是我正在寻找的效果,但我很难搞清楚如何实现它。 (中等VBA经验,但第一次进入课堂) 我的解决scheme:我做了一个generics类,它具有我将用于每个参数的最小/最大/单位/反转参数,所以只需要设置一次,然后重用。 设置类 Private pMin As Integer Private pMax As Integer Private pUnit As String Private pInvert As Boolean Public Property Get Min() As Integer Min = pMin End Property Public Property Get Max() As Integer Max = pMax […]

使用Excel VBAclosuresPowerpoint对象(不使用Powerpoint.Application)

希望有人可以帮助我一些VBA代码。 我使用VBA循环将Excel图表,文本框和表格粘贴到Powerpoint模板中。 但是,因为我不能确定用户将安装Powerpoint对象库,所以我不能使用Dim PPTApp作为Powerpoint.Applicationtypes的语法。 我使用对象。 它工作很好。 除了一件:closuresPowerpoint。 码: Dim oPPTPres As Object ' Late binding: This is a PowerPoint.Presentation but we cannot assume that the Microsoft PowerPoint 11 library will be loaded in the workbook that this module has been copied to. Dim oPPTShape As Object ' Late binding: This is a PowerPoint.Shapebut we cannot […]