LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Copy range to closed workbook

Hi

I'm trying to copy a range from the issue worksheet which is in the open
workbook to the Issue workbook. The sheet name is from a dynamic formula on
the lookuplists sheet which is open but hidden.

It fails on the set Destrange line.

Thanks

Wendy
Sub Movepost()

Dim DestWB As Workbook
Dim SourceRange As Range
Dim DestRange As Range
Dim WS As Worksheet
Dim LRow As Integer
Dim DestRow As Integer
Dim DestWs As Worksheet
Dim Destwsname As String


Set WS = Sheets("LookupLists")
Destwsname = Range("C1").Value 'week number and day eg W1Mon
Set WS = Nothing

Set WS = Worksheets("Issue")
LRow = WS.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row - 1
Set SourceRange = ThisWorkbook.Worksheets("Issue").Range("A2:B" & LRow)
SourceRange.Copy

Set DestRange =
Workbooks("d:\Issue.xls").Worksheets(Destwsname).R ange("A" & LRow)


DestRange.PasteSpecial xlPasteValues, , False, False

End Sub


 
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
copy from closed workbook again! ;( Christy Excel Programming 6 March 4th 05 10:33 PM
Copy data from a closed workbook (ADO) Christy Excel Programming 2 March 4th 05 06:41 PM
Possible to copy sheets into another (closed!) workbook? Grotifant Excel Discussion (Misc queries) 5 February 23rd 05 08:55 AM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM
How to copy a range to a closed workbook max Excel Programming 1 July 16th 04 11:13 AM


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