Consulting

Results 1 to 3 of 3

Thread: Userform to only open and run once.

  1. #1

    Userform to only open and run once.

    Hi all,

    I am realativly new to VBA (self taught from google and youtube).

    I have created a userform that completes my documents. The document is saved on a sharepoint site. People will open the document, complete/run the userform to create the document (via bookmarks) and then save it. However, if they click on their document again the userform pops back up (and as most of the document bookmarks have been deleted, the userform won't run again). Is there a way that once the userform has run it won't come up again if the same document is opened?
    I also tried toying with the idea of once the userform has run, to force a 'save as' to save as a docx. Instead of a docm. File. However I'm not that skilled with the coding to figure out how to do this.

    thanks in advance for any assistance

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    You should save your document as a macro-enabled (dotm) template with a Document_New macro to load the userform. Any documents thus created will default to the docx format, yet will have the userformat auto-load only when the document is created.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Hi Paul,

    Sorry about the late reply.

    Thanks so much for the above! Exactly what i wanted.

    Aaron

Posting Permissions

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