Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default macro question

hopefully an easy question:
i have created an excel macro where i have to copy data from a file
and then close the file before pasting the data.
there is a pop-up window that appears at that point
asking me if i want to save data just copied to the clipboard even though
i'm closing the file. i click the 'yes' button in the pop-up, and then
past the data into a file.

the macro works great except that pop-up still appears. i click 'yes'
button while macro is running and the macro finishes.

Basically, my question is: why doesn't the macro 'remember' me pressing
the 'yes' button during the macro recording? Or, is there a way to
that pop-up, or tell clipboard to always remember what was last copied.

sorry so long winded, hope all is well.

sf
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 103
Default macro question

On 19 Sep 2003 17:38:37 -0700, (foamfollower) wrote:

You need to edit the macro. All you need to do is put the line:

Application.DisplayAlerts = False

before you close the file. Once that's done, turn it back on:

Application.DisplayAlerts = True

The macro recorder only records your responses to Excel's dialogs to
the extent that they drive the actions that you're taking. The
recorder doesn't record your responses to standard dialogs.

hopefully an easy question:
i have created an excel macro where i have to copy data from a file
and then close the file before pasting the data.
there is a pop-up window that appears at that point
asking me if i want to save data just copied to the clipboard even though
i'm closing the file. i click the 'yes' button in the pop-up, and then
past the data into a file.

the macro works great except that pop-up still appears. i click 'yes'
button while macro is running and the macro finishes.

Basically, my question is: why doesn't the macro 'remember' me pressing
the 'yes' button during the macro recording? Or, is there a way to
that pop-up, or tell clipboard to always remember what was last copied.

sorry so long winded, hope all is well.

sf



---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default macro question

I would close the file after the paste.
After the paste is complete, add the following :

Application.CutCopyMode = False

This should eliminate that annoying MsgBox.

Then, close the file.

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

On 19 Sep 2003 17:38:37 -0700, (foamfollower) wrote:

hopefully an easy question:
i have created an excel macro where i have to copy data from a file
and then close the file before pasting the data.
there is a pop-up window that appears at that point
asking me if i want to save data just copied to the clipboard even though
i'm closing the file. i click the 'yes' button in the pop-up, and then
past the data into a file.

the macro works great except that pop-up still appears. i click 'yes'
button while macro is running and the macro finishes.

Basically, my question is: why doesn't the macro 'remember' me pressing
the 'yes' button during the macro recording? Or, is there a way to
that pop-up, or tell clipboard to always remember what was last copied.

sorry so long winded, hope all is well.

sf


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 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Macro question orquidea Excel Discussion (Misc queries) 4 January 11th 08 01:05 AM
Macro Question Vick Excel Discussion (Misc queries) 1 November 27th 07 02:58 PM
Macro Question ?? carl Excel Worksheet Functions 7 May 18th 07 11:45 PM
Macro Question carl Excel Worksheet Functions 3 May 16th 07 10:58 PM


All times are GMT +1. The time now is 06:25 PM.

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

About Us

"It's about Microsoft Excel"