Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Get rid of Information message

I am using a macro to transfer a large data from one worksheet to
another, and I would like this is to occur automatically at a given
frequency (once an hour, etc). I get the information message that
"There is a large amount of information on the clipboard. Do you want
to save it? etc" and the macro stops there, waiting for a reply. How
do I get the macro to either suppress this message or answer the
message with a "no"? Also, how do I set up a loop to run this macro at
regular intervals? Thanks for your help.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Get rid of Information message

Hi fmistry

You can copy without using the clipboard (one line of code)
Sheets("Sheet1").Range("A1:Z1000").Copy Sheets("Sheet2").Range("A1")

Or use this to clear the clipboard after the paste line in your code
Application.CutCopyMode = False


--
Regards Ron de Bruin
http://www.rondebruin.nl



"fmistry" wrote in message oups.com...
I am using a macro to transfer a large data from one worksheet to
another, and I would like this is to occur automatically at a given
frequency (once an hour, etc). I get the information message that
"There is a large amount of information on the clipboard. Do you want
to save it? etc" and the macro stops there, waiting for a reply. How
do I get the macro to either suppress this message or answer the
message with a "no"? Also, how do I set up a loop to run this macro at
regular intervals? Thanks for your help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default Get rid of Information message

Thanks, Ron.

The second method you suggested worked very well.

I am using the code generated by "Record macro" to copy data from one
file to another. For example, to copy data from file 901-154.log to
E901-154.xls, I use

Windows("901-154.log").Activate
Range("A2:A9001").Select
Selection.Copy
Windows("E901-154.xls").Activate
Sheets("Valve SP").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False

How would I use your Sheets command?

About running the macro at fixed intervals, what should I do?

Thank you for your help.

Firoz


Ron de Bruin wrote:
Hi fmistry

You can copy without using the clipboard (one line of code)
Sheets("Sheet1").Range("A1:Z1000").Copy Sheets("Sheet2").Range("A1")

Or use this to clear the clipboard after the paste line in your code
Application.CutCopyMode = False


--
Regards Ron de Bruin
http://www.rondebruin.nl



"fmistry" wrote in message oups.com...
I am using a macro to transfer a large data from one worksheet to
another, and I would like this is to occur automatically at a given
frequency (once an hour, etc). I get the information message that
"There is a large amount of information on the clipboard. Do you want
to save it? etc" and the macro stops there, waiting for a reply. How
do I get the macro to either suppress this message or answer the
message with a "no"? Also, how do I set up a loop to run this macro at
regular intervals? Thanks for your help.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Get rid of Information message

Try this

With pastespecial you can't use a one liner only with a normal copy

You can remove the PasteSpecial lines you not want

Sub test()
Workbooks("901-154.log").Sheets(1).Range("A2:A9001").Copy

With Workbooks("E901-154.xls").Sheets("Valve SP")
.Range("A11").PasteSpecial Paste:=8
' Paste:=8 will copy the column width in Excel 2000 and higher
.Range("A11").PasteSpecial xlPasteValues, , False, False
.Range("A11").PasteSpecial xlPasteFormats, , False, False
Application.CutCopyMode = False
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"fmistry" wrote in message oups.com...
Thanks, Ron.

The second method you suggested worked very well.

I am using the code generated by "Record macro" to copy data from one
file to another. For example, to copy data from file 901-154.log to
E901-154.xls, I use

Windows("901-154.log").Activate
Range("A2:A9001").Select
Selection.Copy
Windows("E901-154.xls").Activate
Sheets("Valve SP").Select
Range("A11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False

How would I use your Sheets command?

About running the macro at fixed intervals, what should I do?

Thank you for your help.

Firoz


Ron de Bruin wrote:
Hi fmistry

You can copy without using the clipboard (one line of code)
Sheets("Sheet1").Range("A1:Z1000").Copy Sheets("Sheet2").Range("A1")

Or use this to clear the clipboard after the paste line in your code
Application.CutCopyMode = False


--
Regards Ron de Bruin
http://www.rondebruin.nl



"fmistry" wrote in message oups.com...
I am using a macro to transfer a large data from one worksheet to
another, and I would like this is to occur automatically at a given
frequency (once an hour, etc). I get the information message that
"There is a large amount of information on the clipboard. Do you want
to save it? etc" and the macro stops there, waiting for a reply. How
do I get the macro to either suppress this message or answer the
message with a "no"? Also, how do I set up a loop to run this macro at
regular intervals? Thanks for your help.




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
Simple message box question zeyneddine Excel Discussion (Misc queries) 1 August 14th 06 08:23 PM
Importing information from 2 workbooks into a 3rd one Susanneec Links and Linking in Excel 2 April 29th 06 12:57 AM
Importing information from 2 workbooks into a 3rd one Susanneec Excel Worksheet Functions 2 April 21st 06 05:27 PM
Importing information from 2 workbooks into a 3rd one Susanneec Excel Discussion (Misc queries) 0 April 20th 06 10:50 PM
Message Box Greg Excel Discussion (Misc queries) 1 April 11th 05 05:01 PM


All times are GMT +1. The time now is 05:11 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"