Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem copying a range to a different workbook
I can't get this to work at all, could someone tell me what's wrong
with this? Workbooks(strHCW).Worksheets("Agn").Activate ActiveWindow.WindowState = xlMaximized Workbooks(strHCW).Worksheets("Agn").Range("$A$1", "$A$1").Select Selection.Copy ActiveWindow.WindowState = xlMinimized Workbooks(strOutput).Worksheets("DataDumpCir").Act ivate activeWindow.WindowState = xlMaximized Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Select Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Paste thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem copying a range to a different workbook
I sorted the problem out, I found a good example in this group which
worked. thanks On Tue, 07 Dec 2004 19:54:14 -0500, wrote: I can't get this to work at all, could someone tell me what's wrong with this? Workbooks(strHCW).Worksheets("Agn").Activate ActiveWindow.WindowState = xlMaximized Workbooks(strHCW).Worksheets("Agn").Range("$A$1 ", "$A$1").Select Selection.Copy ActiveWindow.WindowState = xlMinimized Workbooks(strOutput).Worksheets("DataDumpCir").Ac tivate activeWindow.WindowState = xlMaximized Workbooks(strOutput).Worksheets("DataDumpCir").Ra nge("$A$6","$A$6").Select Workbooks(strOutput).Worksheets("DataDumpCir").Ra nge("$A$6","$A$6").Paste thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem copying a range to a different workbook
Hi Bob,
The following worked for me: Sub Tester() Dim strHCW As String Dim StrOutput As String strHCW = "Book1.xls" '<<====== CHANGE StrOutput = "Book2.xls" '<<====== CHANGE Workbooks(strHCW).Sheets("Agn").Range("A1").Copy Destination:= _ Workbooks(StrOutput).Sheets("DataDumpCir").Range(" A6") End Sub Change the names of the two workbooks to reflect your names. --- Regards, Norman wrote in message ... I can't get this to work at all, could someone tell me what's wrong with this? Workbooks(strHCW).Worksheets("Agn").Activate ActiveWindow.WindowState = xlMaximized Workbooks(strHCW).Worksheets("Agn").Range("$A$1", "$A$1").Select Selection.Copy ActiveWindow.WindowState = xlMinimized Workbooks(strOutput).Worksheets("DataDumpCir").Act ivate activeWindow.WindowState = xlMaximized Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Select Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Paste thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem copying a range to a different workbook
Try
Sub CopyPaster() Windows(strHCW).Activate Sheets("Agn").Select Range("A1").Select Selection.Copy Windows("strOutput").Activate sheets(DataDumpCir").Select Range("A6").Select ActiveSheet.Paste End Sub " wrote: I can't get this to work at all, could someone tell me what's wrong with this? Workbooks(strHCW).Worksheets("Agn").Activate ActiveWindow.WindowState = xlMaximized Workbooks(strHCW).Worksheets("Agn").Range("$A$1", "$A$1").Select Selection.Copy ActiveWindow.WindowState = xlMinimized Workbooks(strOutput).Worksheets("DataDumpCir").Act ivate activeWindow.WindowState = xlMaximized Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Select Workbooks(strOutput).Worksheets("DataDumpCir").Ran ge("$A$6","$A$6").Paste thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem copying formula from one workbook to another | Excel Discussion (Misc queries) | |||
Problem copying formula to range of cells | Setting up and Configuration of Excel | |||
Problem copying from one workbook to anoth | Excel Programming | |||
Problem copying range and pasting to multiple sheets | Excel Programming | |||
Copying a Filtered Range from a Sheet in another Workbook | Excel Programming |