Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Extracting from another file

I am combining information from one file to another. I ran a macro to cut and paste the information and it works except that the macro will stop and say the standard 'there is information on the clipboard, do you want to be able to paste..." that I have to answer yes to before it will transfer the information to the second file. Is there something I can wirte in the coding so I can bypass this? My macro is
Sheets("Graph Data").Select
Range("b134:G258").Select
Workbooks.Open Filename:= _
"C:\Retail\DirectConsolidated.xls"
Sheets("Graph Data").Select
Range("B4:G128").Select
Selection.Copy
ActiveWindow.Close
ActiveSheet.Past

I would appreciate any help!! Thanks
Marie
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Extracting from another file

Sheets("Graph Data").Select
Range("b134:G258").Select
Workbooks.Open Filename:= _
"C:\Retail\DirectConsolidated.xls"
Sheets("Graph Data").Select
Range("B4:G128").Select
Selection.Copy
ActiveSheet.Past
application.CutCopyMode = False
ActiveWindow.Close

--
Regards,
Tom Ogilvy

"Marie" wrote in message
...
I am combining information from one file to another. I ran a macro to cut

and paste the information and it works except that the macro will stop and
say the standard 'there is information on the clipboard, do you want to be
able to paste..." that I have to answer yes to before it will transfer the
information to the second file. Is there something I can wirte in the coding
so I can bypass this? My macro is
Sheets("Graph Data").Select
Range("b134:G258").Select
Workbooks.Open Filename:= _
"C:\Retail\DirectConsolidated.xls"
Sheets("Graph Data").Select
Range("B4:G128").Select
Selection.Copy
ActiveWindow.Close
ActiveSheet.Past

I would appreciate any help!! Thanks
Marie



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default Extracting from another file

Thanks Tom, It worked!! But...now it is asking me if I want to save the file I am extracting the information from. What code do I need to use to say yes to that?

"Tom Ogilvy" wrote:

Sheets("Graph Data").Select
Range("b134:G258").Select
Workbooks.Open Filename:= _
"C:\Retail\DirectConsolidated.xls"
Sheets("Graph Data").Select
Range("B4:G128").Select
Selection.Copy
ActiveSheet.Past
application.CutCopyMode = False
ActiveWindow.Close

--
Regards,
Tom Ogilvy

"Marie" wrote in message
...
I am combining information from one file to another. I ran a macro to cut

and paste the information and it works except that the macro will stop and
say the standard 'there is information on the clipboard, do you want to be
able to paste..." that I have to answer yes to before it will transfer the
information to the second file. Is there something I can wirte in the coding
so I can bypass this? My macro is
Sheets("Graph Data").Select
Range("b134:G258").Select
Workbooks.Open Filename:= _
"C:\Retail\DirectConsolidated.xls"
Sheets("Graph Data").Select
Range("B4:G128").Select
Selection.Copy
ActiveWindow.Close
ActiveSheet.Past

I would appreciate any help!! Thanks
Marie




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
extracting a date from a comment field in an excel file dave Excel Discussion (Misc queries) 3 December 19th 07 08:14 PM
Extracting data from one xls file and input into another xls file trainerbro Excel Discussion (Misc queries) 1 November 1st 06 08:57 PM
Extracting First Name Ruan New Users to Excel 12 February 15th 06 05:41 PM
Extracting text from one file to another Vaud Excel Discussion (Misc queries) 1 February 11th 06 09:41 AM
Extracting File Names and Properties Albacore33 Excel Worksheet Functions 3 February 10th 05 03:23 PM


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