Consulting

Results 1 to 8 of 8

Thread: Solved: VBA Form Outside of Word

  1. #1
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location

    Solved: VBA Form Outside of Word

    I have created a form using VB within Microsoft Word. I would like to run this form outside of Word as if it were an application.
    Can anyone tell me how this can be done??

    Many Thanks

    Pete

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Pete,
    I don't believe you can do this. You would need a standalone application such as VB6. The closest you could get would be to hide the word application on startup eg http://www.vbaexpress.com/kb/getarticle.php?kb_id=184
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    What you want to do is compile your form & code as a stand-alone executable.
    This is not possible with VBA - you will need to recreate it in a suitable application environment like Visual Basic (classic or dotNet).
    K :-)

  4. #4
    VBAX Regular
    Joined
    Apr 2005
    Posts
    86
    Location
    Thanks guys, i'll do that then.

    Pete

  5. #5
    Moderator VBAX Mentor sheeeng's Avatar
    Joined
    May 2005
    Location
    Kuala Lumpur
    Posts
    392
    Location
    Quote Originally Posted by Killian
    What you want to do is compile your form & code as a stand-alone executable.
    This is not possible with VBA - you will need to recreate it in a suitable application environment like Visual Basic (classic or dotNet).
    I do agree that VBA without Office application cannot be run standalone.

    The most you can do is set the following to true or false.

    [VBA] Application.Visible = True [/VBA]

    HTH

  6. #6
    Administrator
    VP-Knowledge Base VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by sheeeng
    The most you can do is set the following to true or false.

    [VBA] Application.Visible = True [/VBA]
    This would work but you have to make very sure to include a good error handler to take care of the application object when a unexpected error occurs.

    Invisible instances of Word could cause problems..
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

  7. #7
    Moderator VBAX Mentor sheeeng's Avatar
    Joined
    May 2005
    Location
    Kuala Lumpur
    Posts
    392
    Location
    Quote Originally Posted by MOS MASTER
    This would work but you have to make very sure to include a good error handler to take care of the application object when a unexpected error occurs.

    Invisible instances of Word could cause problems..
    Thx.

  8. #8
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    No Problem you where right that in that way you could make it look like a true program with just the form on top. (Although we know better)
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

Posting Permissions

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