Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I need a function that is going to hit the "Y" key for me. When I run a certain macro, it wants to send a file to a certain location to update it and replace the old one. During this I have to hit the "Y" key to say yes. I want to add something to the script so I dont have to do this and then finally the script will be able to run on its own without me. Trevor -- Bowes813 ------------------------------------------------------------------------ Bowes813's Profile: http://www.excelforum.com/member.php...o&userid=23779 View this thread: http://www.excelforum.com/showthread...hreadid=374160 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Good evening Bowes13 Use this command at the start of your code: Application.DisplayAlerts = False and this at the end of your code: Application.DisplayAlerts = True This will force the macro to not ask you a question, but choose th default option on your behalf (which would be OK - overwrite th file). HTH Dominic -- dominic ----------------------------------------------------------------------- dominicb's Profile: http://www.excelforum.com/member.php...fo&userid=1893 View this thread: http://www.excelforum.com/showthread.php?threadid=37416 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() What if my default is No -- Bowes81 ----------------------------------------------------------------------- Bowes813's Profile: http://www.excelforum.com/member.php...fo&userid=2377 View this thread: http://www.excelforum.com/showthread.php?threadid=37416 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Bowes813 What I said in my answer was correct, but I think perhaps I could have explained it a little better. this command will set your default value for the question to true and answer the question for you. Indeed, this is what the Excel 2003 help file has to say about the DisplayAlerts property: "When using the SaveAs method for workbooks to overwrite an existing file, the 'Overwrite' alert has a default of 'No', while the 'Yes' response is selected by Excel when the DisplayAlerts property is set equal to True." HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=374160 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Script to insert Row | Excel Discussion (Misc queries) | |||
Need VBA script to auto-insert value upon row insert | Excel Worksheet Functions | |||
Script to insert the next Friday | Excel Programming | |||
Script to insert the next Friday | Excel Programming | |||
insert excel vb script | Excel Programming |