Returns the current height, left, top, or width value of the Viewport.
Syntax
object.ViewportHeight
object.ViewportLeft
object.ViewportTop
object.ViewportWidth
The object placeholder represents an object expression that evaluates to an object in the Applies To list.
Return Type
Single
Remarks
The application used to view the ActiveX document controls the size of the Viewport. However, you can use the MinHeight and MinWidth properties to resize the UserDocument. For example, the code below resizes a PictureBox control according to the ViewportHeight and ViewportWidth properties.
Private Sub UserDocument_Resize()
Picture1.Width = UserDocument.ViewportWidth - _
Picture1.Left
Picture1.Height = UserDocument.ViewportHeight - _
Picture1.Top
End Sub