Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to 'click OK button' automatically in excel

Help!! This is driving me mad and I cannot find a code anywhere to do it

I have macros that open and close spreadsheets / copy large areas of data and I get the normal "Do you want to save your changes?" and "Do you want to keep the information on the clipboard?" dialogue boxes appearing

What I want my macro to do is to say "Yes" or"No" automatically - without any user interaction (as the answer to these questions will never change - and to be frank it is damn annoying)

Has anyone any idea? I thought I was OK at writing macros until this!!!

Ta very muc
Net


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default How to 'click OK button' automatically in excel

To get rid of the "Do you want to save changes" prompt
try this


Private Sub Workbook_BeforeClose(Cancel As Boolean)
Thisworkbook.saved = true 'this closes without saving
application.cutcopymode = false
End Sub

-----Original Message-----
Help!! This is driving me mad and I cannot find a code

anywhere to do it!

I have macros that open and close spreadsheets / copy

large areas of data and I get the normal "Do you want to
save your changes?" and "Do you want to keep the
information on the clipboard?" dialogue boxes appearing.

What I want my macro to do is to say "Yes" or"No"

automatically - without any user interaction (as the
answer to these questions will never change - and to be
frank it is damn annoying).

Has anyone any idea? I thought I was OK at writing macros

until this!!!!

Ta very much
Net


.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to 'click OK button' automatically in excel

Libb

Thanks - Brilliant - It works! - Sanity has been preserved !!!!

Cheer
Net
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 files opens blank- need to click on Office button to vi Roxy Excel Discussion (Misc queries) 2 September 26th 09 07:21 PM
Excel 2003 won't let me click on a button when i protect document Brenda Excel Discussion (Misc queries) 1 October 22nd 08 02:32 AM
can i set a button in excel to automatically send the page when George Excel Discussion (Misc queries) 1 December 21st 07 01:33 AM
Click button to automatically add row yirawan Excel Worksheet Functions 1 November 24th 05 04:26 PM
VBA button click need help. Need LEN help. Nigel Cummins Excel Programming 4 July 11th 03 08:52 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"