ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto-Open procedure (https://www.excelbanter.com/excel-programming/329961-auto-open-procedure.html)

Patrick

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

Dave Peterson[_5_]

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

TT[_3_]

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 ***

Patrick

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


Chuckles123[_93_]

Auto-Open procedure
 

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

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

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

TIA,
Chuckles12

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=37336


STEVE BELL

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"
wrote in message
...

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 a
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




Chuckles123[_94_]

Auto-Open procedure
 

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


--
Chuckles123
------------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...o&userid=14948
View this thread: http://www.excelforum.com/showthread...hreadid=373365



All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com