Consulting

Results 1 to 3 of 3

Thread: Can this be done? User form stop blocking document

  1. #1
    VBAX Newbie
    Joined
    Dec 2013
    Posts
    2
    Location

    Can this be done? User form stop blocking document

    Hello everyone,

    I am new to VBA and I have never written any full code on my own, just used bits and pieces from the net, and modified them. But this time I couldn't find anything to help me, so I am hoping that someone knows the answer to this. I am in the the following situation:

    I have a word document which containts in random places lines of text on which a number of changes need to be done, lines which can only be identified by a person(can't make wildcard expressions, or any form of automation).

    I can implement the modifications I want done in a user form with many buttons. Is is possible to make the user form not block my document when I want to select text from it? I made the user form and the functions I want on the buttons but when I run the macro, the document gets blocked and I can't select anything.

    Is it even possible in VBA to have a document and a user form opened, and select a piece of text, and press a button to change that text, then select another piece of text anywere and have the interface there, not disappear or blocking the document? Am I doing something wrong, or is it simply not possible?

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    You can load the userform in a modeless state. That will allow you to switch between the userform and the document, much the same as when you're using the Find/Replace dialogue. The code for this would be like:

    UserForm1.Show vbModeless
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    VBAX Newbie
    Joined
    Dec 2013
    Posts
    2
    Location
    Hello,

    This is the perfect solution for my problem.

    Thank you very much.

Tags for this Thread

Posting Permissions

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