G
Greg Maxey
I have a control toolbox command button in a protected form. When inserted
the height property is 24 and the width property is 72. The control is
formatted as a floating shape.
When I run the following code the control is not visible in the form:
Sub HideResetCommand()
Dim oCtr
Set oCtr = ActiveDocument.Shapes(1)
oCtr.OLEFormat.Object.Caption = ""
oCtr.OLEFormat.Object.Width = 0
oCtr.OLEFormat.Object.Height = 0
End Sub
The following code makes the control visible again in the form:
Sub ShowResetCommand()
Dim oCtr
Set oCtr = ActiveDocument.Shapes(1)
oCtr.OLEFormat.Object.Caption = "Reset Form"
oCtr.OLEFormat.Object.LockAspectRation = False
oCtr.OLEFormat.Object.Height = 24
oCtr.OLEFormat.Object.Width = 72
End Sub
Here is the proble. The control appears 72 picas high and 72 picas wide.
If I change the order of the height and width commands above then the
control appears as 24 picas high and 24 picas wide.
There is no intellisense with the .Object so I am at a loss as to what
command line I need.
Thanks.
the height property is 24 and the width property is 72. The control is
formatted as a floating shape.
When I run the following code the control is not visible in the form:
Sub HideResetCommand()
Dim oCtr
Set oCtr = ActiveDocument.Shapes(1)
oCtr.OLEFormat.Object.Caption = ""
oCtr.OLEFormat.Object.Width = 0
oCtr.OLEFormat.Object.Height = 0
End Sub
The following code makes the control visible again in the form:
Sub ShowResetCommand()
Dim oCtr
Set oCtr = ActiveDocument.Shapes(1)
oCtr.OLEFormat.Object.Caption = "Reset Form"
oCtr.OLEFormat.Object.LockAspectRation = False
oCtr.OLEFormat.Object.Height = 24
oCtr.OLEFormat.Object.Width = 72
End Sub
Here is the proble. The control appears 72 picas high and 72 picas wide.
If I change the order of the height and width commands above then the
control appears as 24 picas high and 24 picas wide.
There is no intellisense with the .Object so I am at a loss as to what
command line I need.
Thanks.