+ Reply to Thread
Results 1 to 7 of 7

Auto-Open procedure

  1. #1
    patrick
    Guest

    Auto-Open procedure

    I am attempting to write an auto open procedure that minimizes the Excel
    application and then displays the first menu form. The code I have used is:

    Sub Auto_Open()

    Application.WindowState = xlMinimized
    fmMenuMain.Show

    End Sub

    This minimizes Excel but does not correctly display the form - the tab on
    the taskbar flashes & has to be 'clicked' to display the form. Can anyone
    help with curing this - to allow the workbook to be minimized and to display
    the form correctly?

    Thanks in anticipation

    Patrick

  2. #2
    Dave Peterson
    Guest

    Re: Auto-Open procedure

    How about hiding the application?

    application.visible = false
    'show your form, do your stuff

    'But remember to turn it back on (sometime)
    application.visible = true



    patrick wrote:
    >
    > I am attempting to write an auto open procedure that minimizes the Excel
    > application and then displays the first menu form. The code I have used is:
    >
    > Sub Auto_Open()
    >
    > Application.WindowState = xlMinimized
    > fmMenuMain.Show
    >
    > End Sub
    >
    > This minimizes Excel but does not correctly display the form - the tab on
    > the taskbar flashes & has to be 'clicked' to display the form. Can anyone
    > help with curing this - to allow the workbook to be minimized and to display
    > the form correctly?
    >
    > Thanks in anticipation
    >
    > Patrick


    --

    Dave Peterson

  3. #3
    TT
    Guest

    Re: Auto-Open procedure

    Or maybe a modeless form?

    Sub Auto_Open()
    Application.WindowState = xlMinimized
    fmMenuMain.Show vbModeless
    End Sub

    Make sure that you unload the form whenever you don't need it anymore
    (Unload fmMenuMain)

    With kind regards,
    Ton Teuns

    *** Sent via Developersdex http://www.developersdex.com ***

  4. #4
    patrick
    Guest

    Re: Auto-Open procedure

    Thanks

    2 possible options - great

    "Dave Peterson" wrote:

    > How about hiding the application?
    >
    > application.visible = false
    > 'show your form, do your stuff
    >
    > 'But remember to turn it back on (sometime)
    > application.visible = true
    >
    >
    >
    > patrick wrote:
    > >
    > > I am attempting to write an auto open procedure that minimizes the Excel
    > > application and then displays the first menu form. The code I have used is:
    > >
    > > Sub Auto_Open()
    > >
    > > Application.WindowState = xlMinimized
    > > fmMenuMain.Show
    > >
    > > End Sub
    > >
    > > This minimizes Excel but does not correctly display the form - the tab on
    > > the taskbar flashes & has to be 'clicked' to display the form. Can anyone
    > > help with curing this - to allow the workbook to be minimized and to display
    > > the form correctly?
    > >
    > > Thanks in anticipation
    > >
    > > Patrick

    >
    > --
    >
    > Dave Peterson
    >


  5. #5
    Forum Contributor
    Join Date
    10-03-2004
    Posts
    102

    Question I Have A Very Related Question

    I have an Auto_Open macro that is triggered via an XP Pro Scheduled Task; the macro is digitally signed and users have previously accepted the appropriate digital certificate.

    My two opening lines of code are:
    Application.DisplayAlerts = False
    Application.Visible = False

    My objective is for users to see zero pop-up windows. As of now, this is the case except for a 2-second pop-up at the very beginning. (Macro requires about 30 seconds to complete.) Is it possible to eliminate the 2-second pop-up?

    TIA,
    Chuckles123

  6. #6
    STEVE BELL
    Guest

    Re: Auto-Open procedure

    Since you already have -
    > Application.DisplayAlerts = False


    most pop-ups should not happen.

    One of the possible sources is within code some where.
    Most likely an event macro.

    Look for that possible code.

    Also try adding:
    Application.EnableEvents=False

    --
    steveB

    Remove "AYN" from email to respond
    "Chuckles123" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > I have an Auto_Open macro that is triggered via an XP Pro Scheduled
    > Task; the macro is digitally signed and users have previously accepted
    > the appropriate digital certificate.
    >
    > My two opening lines of code are:
    > Application.DisplayAlerts = False
    > Application.Visible = False
    >
    > My objective is for users to see zero pop-up windows. As of now, this
    > is the case except for a 2-second pop-up at the very beginning. (Macro
    > requires about 30 seconds to complete.) Is it possible to eliminate the
    > 2-second pop-up?
    >
    > TIA,
    > Chuckles123
    >
    >
    > --
    > Chuckles123
    > ------------------------------------------------------------------------
    > Chuckles123's Profile:
    > http://www.excelforum.com/member.php...o&userid=14948
    > View this thread: http://www.excelforum.com/showthread...hreadid=373365
    >




  7. #7
    Forum Contributor
    Join Date
    10-03-2004
    Posts
    102

    Steve, Thanks For Your Post

    I tried using 'Application.EnableEvents = False' at the beginning of my code -- there was no change in results. I have even tried this on a very simple macro -- just a few lines of code -- same results.

    I believe it is some type of 'handshaking' between: naming the macro 'Auto_Open'; using Windows' Scheduled Task as a trigger; and the user having previously accepted and stored on his/her computer the digital certificate. It seems there must be some way to eliminate this 2-second pop-up.

    Chuckles123

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1