ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Override prompt for Office Clipboard (https://www.excelbanter.com/excel-discussion-misc-queries/206244-override-prompt-office-clipboard.html)

Brent E

Override prompt for Office Clipboard
 
Good Morning,

I am using a spreadsheet as a template to format headers for imported
spreadsheets. Once the file is open, I use a macro that opens the template
file, copies the necessary data, pastes the data in the imported file, and
then closes the template file.

The problem is in closing the template file, the macro hangs because a
dialogue box pops up prompting whether to keep the copied data on the
clipboard. Is there a way to override this and select "No" as the option?

Thanks

Dave Peterson

Override prompt for Office Clipboard
 
Try adding:

application.cutcopymode = false

After you're finished with the copy|paste.

Brent E wrote:

Good Morning,

I am using a spreadsheet as a template to format headers for imported
spreadsheets. Once the file is open, I use a macro that opens the template
file, copies the necessary data, pastes the data in the imported file, and
then closes the template file.

The problem is in closing the template file, the macro hangs because a
dialogue box pops up prompting whether to keep the copied data on the
clipboard. Is there a way to override this and select "No" as the option?

Thanks


--

Dave Peterson

Brent E

Override prompt for Office Clipboard
 
Good Morning Dave,

Thanks for the post. I tried that but the dialogue box still seems to
appear. Any suggestions?

Thanks,

"Dave Peterson" wrote:

Try adding:

application.cutcopymode = false

After you're finished with the copy|paste.

Brent E wrote:

Good Morning,

I am using a spreadsheet as a template to format headers for imported
spreadsheets. Once the file is open, I use a macro that opens the template
file, copies the necessary data, pastes the data in the imported file, and
then closes the template file.

The problem is in closing the template file, the macro hangs because a
dialogue box pops up prompting whether to keep the copied data on the
clipboard. Is there a way to override this and select "No" as the option?

Thanks


--

Dave Peterson


Brent E

Override prompt for Office Clipboard
 
I figured out a solution.

If I place the "Application.cutcopymode = false" after the close command,
the dialogue box will always appear.

But if I place the Application.cutcopymode = false before the close command,
the board is cleared, file is closed, and no dialogue box pops up.
"Brent E" wrote:

Good Morning Dave,

Thanks for the post. I tried that but the dialogue box still seems to
appear. Any suggestions?

Thanks,

"Dave Peterson" wrote:

Try adding:

application.cutcopymode = false

After you're finished with the copy|paste.

Brent E wrote:

Good Morning,

I am using a spreadsheet as a template to format headers for imported
spreadsheets. Once the file is open, I use a macro that opens the template
file, copies the necessary data, pastes the data in the imported file, and
then closes the template file.

The problem is in closing the template file, the macro hangs because a
dialogue box pops up prompting whether to keep the copied data on the
clipboard. Is there a way to override this and select "No" as the option?

Thanks


--

Dave Peterson



All times are GMT +1. The time now is 09:17 AM.

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