Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Copying a range from one workbook to another workbook

Oops forgot to show the error message that I'm getting.

'Run time Error "438"

Object doesn't support this property or method

See line that says 'Error happens at next line'

Steve

"caldog" wrote:

I know there is probably a simple answer to this problem, but fot the life of
me, I can't find it.

Here is my code:

Private Sub SingleValues_Click()
Workbooks.Open Filename:="C:\Excel\Data1.xls"

'Refresh Data
'Sheets("Singles").Select
'Selection.QueryTable.Refresh BackgroundQuery:=False
'Sheets("Doubles").Select
'Selection.QueryTable.Refresh BackgroundQuery:=False

'Copy Data
Windows("Data1.xls").Activate
Sheets("Singles").Select
Range("A9:F51").Copy
Windows("Data2.xls").Activate
Sheets("Single Game Stats").Select

'Error happens at next line
Range("A9:F51").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

'Sort Download
Windows("Jai-Alai.xls").Activate
Worksheets("Single Game Stats").Range("A9:F51").Select
Selection.Sort Key1:=Range("B9"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Windows("Data1.xls").Activate
ActiveWorkbook.Close
End Sub

Thanks for the help

Steve

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
copying workbook formating to a differnent workbook Roger Excel Worksheet Functions 0 October 30th 09 05:27 PM
Copying A Worksheet From Each Open Workbook to an new Workbook carl Excel Worksheet Functions 1 January 3rd 06 05:37 PM
Copying range to other workbook Excelerate-nl Excel Programming 3 September 23rd 05 12:49 PM
Problem copying a range to a different workbook [email protected] Excel Programming 3 December 8th 04 01:43 AM
Copying a Filtered Range from a Sheet in another Workbook Frederick Excel Programming 2 August 10th 03 03:29 PM


All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"