Display Alerts

ColinKJ

Well-known Member
Joined
Jan 27, 2009
Messages
983
Hi All,

Sorry, this may be a bit naughty, it's a Word VBA throwing up display alert for <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
<o:p></o:p>
"There's a large amount of data on the paste board, do you want to keep it"<o:p></o:p>
<o:p></o:p>
Or something to that effect. <o:p></o:p>
<o:p></o:p>
I have included the Application.DisplayAlerts=False<o:p></o:p>
<o:p></o:p>
but it still comes up every time.<o:p></o:p>
<o:p></o:p>
As I'm attempting to copy data (TextBox's) from the Word Document and then Paste them into XL form a large number of document, I need to suppress the Alert.<o:p></o:p>
<o:p></o:p>
Any suggestions please.
<o:p></o:p>
Regards

ColinKJ
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Greetings,

If you are closing the App (Word), leastwise before pasting, I don't think you'll get around the warning. You may wish to post your code as is, so we can see what's happening?

Mark
 
Upvote 0
Hi Colin,

You can try clearing the clipboard before closing the doc:
Rich (BB code):
Dim MyData As DataObject

Set MyData = New DataObject
MyData.SetText ""
MyData.PutInClipboard

This code is taken from this site:
http://www.word.mvps.org/FAQs/MacrosVBA/ManipulateClipboard.htm

A note: a reference to the Microsoft Forms 2.0 Object library is required.

Does that fix it for you?
 
Upvote 0
Thanks everyone for all the ideas, but I found out why I was creating so much on the clipboard, which wasn't necessary.

Now I've revised the code all ok.

Thanks again for all your help

ColinKJ
 
Upvote 0

Forum statistics

Threads
1,214,593
Messages
6,120,434
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top