Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    getting the form control type (Word 2003)

    Is it possible to find the type of a form control in Word VB? like using GetType() in .NET? i want to do a loop over all form controls, but i want to make it quicker by only processing frame controls.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: getting the form control type (Word 2003)

    You can use code like this:

    Dim ctl As Control
    For Each ctl In Me.Controls
    If TypeOf ctl Is MSForms.Frame Then
    ' It is a frame - do something with it
    MsgBox ctl.Name
    End If
    Next ctl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •