Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Dec 2000
    Location
    Hellertown, Pennsylvania, USA
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA determine if text box selected

    I would like to know if a user clicks on a text box in my document. Is there any code that would capture this? My reason is I do not want any user to be able to edit text in a text box, so I'll redirect them to a bookmark.

    Thanks,
    Allan Bach

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Hi Allan,

    You may be able to define a class event fo this, but that's a fairly complex process. A simpler solution might be to place a transparent shape over it and use Word's drawing tools to group them together. That makes it fairly difficult to access or edit the text.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Star Lounger
    Join Date
    Mar 2010
    Location
    Texas
    Posts
    54
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Rethinking the approach a little for Word 2007+, if you made it a content control, had a content control in the text box, or used a Text box that already had a content control in it, you could use the Document's ContentControlOnEnter event.

Posting Permissions

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