Code to handle clipboard message

  • Thread starter D. Pirate Roberts
  • Start date
D

D. Pirate Roberts

I have a vbscript that does the following:

1. Opens Excel file A
2. Copies data from a range of cells
3. Opens Excel file B
4. Pastes data copied from step 2 above
5. Closes Excel file A
6. Closes Excel file B

When the script reaches step 5, an Excel message says there is a large
amount of data on the clipboard and asks if I want to save the data. Is
there a way to either supress this message or feed it a Yes/No value from
within my script?
 
R

RB Smissaert

I think xlApp.DisplayAlerts = False should do it.
Replace xlApp with whatever you used in VBS.
A better solution might be though to get the values from a closed workbook
as it
saves you opening and closing the wb.
Look at the post dated 29/09/2005, Get Values from closed Excel.

RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top