I'm making a program in excel, and have been trying to create a macro that makes excel close, without the "do you want to save" pop-up coming up, alas i have failed, does anyone have any ideas?i've tried activewindow.close...
I'm making a program in excel, and have been trying to create a macro that makes excel close, without the "do you want to save" pop-up coming up, alas i have failed, does anyone have any ideas?i've tried activewindow.close...
Excel close? Or just the open file?
... will close the active workbook ..
sub closebooknow()
if activeworkbook is nothing then exit sub
activeworkbook.close false
end sub
... will close excel ..
sub closeappnow()
application.displayalerts = false
application.quit
end sub
HTH
--
Regards,
Zack Barresse, aka firefytr, (GT = TFS FF Zack)
"grandfilth" <[email protected]> wrote
in message news:[email protected]...
>
> I'm making a program in excel, and have been trying to create a macro
> that makes excel close, without the "do you want to save" pop-up coming
> up, alas i have failed, does anyone have any ideas?i've tried
> activewindow.close...
>
>
> --
> grandfilth
> ------------------------------------------------------------------------
> grandfilth's Profile:
> http://www.excelforum.com/member.php...o&userid=28240
> View this thread: http://www.excelforum.com/showthread...hreadid=477928
>
You can use
Activeworkbook.Saved = True
to tell excel that the current file is already saved and no further action
is required.
Application.quit
will close down Excel
--
HTH...
Jim Thomlinson
"grandfilth" wrote:
>
> I'm making a program in excel, and have been trying to create a macro
> that makes excel close, without the "do you want to save" pop-up coming
> up, alas i have failed, does anyone have any ideas?i've tried
> activewindow.close...
>
>
> --
> grandfilth
> ------------------------------------------------------------------------
> grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
> View this thread: http://www.excelforum.com/showthread...hreadid=477928
>
>
Hi grandfilth
You can have more then one workbook open in Excel.
What you do then ?
Try this
ActiveWorkbook.Close False ' or true if you want to save
Application.Quit
--
Regards Ron de Bruin
http://www.rondebruin.nl
"grandfilth" <[email protected]> wrote in message
news:[email protected]...
>
> I'm making a program in excel, and have been trying to create a macro
> that makes excel close, without the "do you want to save" pop-up coming
> up, alas i have failed, does anyone have any ideas?i've tried
> activewindow.close...
>
>
> --
> grandfilth
> ------------------------------------------------------------------------
> grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
> View this thread: http://www.excelforum.com/showthread...hreadid=477928
>
Application.DisplayAlerts = False
Application.Quit
--
Regards,
Tom Ogilvy
"grandfilth" <[email protected]> wrote
in message news:[email protected]...
>
> I'm making a program in excel, and have been trying to create a macro
> that makes excel close, without the "do you want to save" pop-up coming
> up, alas i have failed, does anyone have any ideas?i've tried
> activewindow.close...
>
>
> --
> grandfilth
> ------------------------------------------------------------------------
> grandfilth's Profile:
http://www.excelforum.com/member.php...o&userid=28240
> View this thread: http://www.excelforum.com/showthread...hreadid=477928
>
hi,
ActiveWindow.save
ActiveWindow.close
this will prevent the save as box from popping up.
FSt1
"grandfilth" wrote:
>
> I'm making a program in excel, and have been trying to create a macro
> that makes excel close, without the "do you want to save" pop-up coming
> up, alas i have failed, does anyone have any ideas?i've tried
> activewindow.close...
>
>
> --
> grandfilth
> ------------------------------------------------------------------------
> grandfilth's Profile: http://www.excelforum.com/member.php...o&userid=28240
> View this thread: http://www.excelforum.com/showthread...hreadid=477928
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks