Consulting

Results 1 to 2 of 2

Thread: macro to open userform and close everything else

  1. #1

    macro to open userform and close everything else

    The form opens fine. I also want everything else to close or hide.
    thanks.

    [vba]
    Sub Button5_Click()
    frmCREContractForm.show
    End Sub
    [/vba]

  2. #2
    VBAX Mentor CBrine's Avatar
    Joined
    Jun 2004
    Location
    Toronto, Canada
    Posts
    387
    Location
    ironj32,
    I think you need to be a little more specific. Without knowing exactly what is open, we won't be able to tell you how exactly to close it.

    To hide excel, just do

    application.visible =false

    I'm not sure if this will hide the form as well though. Also be careful, since you may end up with orphan open copies of excel sitting in memory, if you don't close it correctly.

    HTH
    Cal
    The most difficult errors to resolve are the one's you know you didn't make.


Posting Permissions

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