Flyingdancing 发表于 2012-7-14 10:24:06

userform1.show显示无效外部过程

网上有说,没有“microsoft windows command controls”引用的,我看了下,确实找不到。regsvr32 mscomctl.ocx后,仍然没有
求解决
'传递标注非关联长度数据
Public angletext As String
'传递按钮选择的对象集
Public sel As AcadSelectionSet
Load UserForm1
UserForm1.Show


Sub DIM_CHANGE()
Dim dimselect As AcadDimAligned
Dim ent As AcadEntity
Set ent = sel.Item(0)
If ent.ObjectName = "AcDbAlignedDimension" Then
Set dimselect = ent
End If
Set angeltext = TextBox1.Text
dimselect.TextOverride = Val(angletext)
Set sel = Nothing
ThisDrawing.SelectionSets("a").Erase
End Sub



http://bbs.mjtd.com/xwb/images/bgimg/icon_logo.png 该贴已经同步到 Flyingdancing的微博

woaishuijia 发表于 2012-7-15 09:58:41

本帖最后由 woaishuijia 于 2012-7-15 10:00 编辑

Load UserForm1
UserForm1.show这两行必须放到过程里面啊,在模块的声明段当然会出错了.
PS:Load UserForm1这一行多余

Flyingdancing 发表于 2012-7-15 12:58:19

woaishuijia 发表于 2012-7-15 09:58 static/image/common/back.gif
这两行必须放到过程里面啊,在模块的声明段当然会出错了.
PS:Load UserForm1这一行多余

谢谢
~~~~~~~~~~~~~~~~~··
页: [1]
查看完整版本: userform1.show显示无效外部过程