Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub m01_GetData()
' Dim origin As String Dim orgn As Workbook, dest As Workbook Dim wsIr As Worksheet Dim wsDr As Worksheet Dim firstRow As Long Dim lastRow As Long Set wsIr = Sheets("INTLraw") Set wsDr = Sheets("DOMraw") Do wsDr.Activate Range("A1").Select Application.ScreenUpdating = False origin = Application.GetOpenFilename("Microsoft Office Excel Files(*.xl*;*.xls;*.xla;*.xlm;*.xlc;*.xlw),*.xl*;* .xls;*.xla;*.xlm;*.xlc;*.xlw") If origin = "False" Then Exit Sub Workbooks.Open origin, 0, True Set orgn = ActiveWorkbook orgn.Activate Sheets(1).Activate ViewMode = ActiveWindow.View ActiveWindow.View = xlNormalView ActiveSheet.DisplayPageBreaks = False firstRow = ActiveSheet.UsedRange.Cells(1).Row lastRow = ActiveSheet.UsedRange.Rows.Count + firstRow - 1 With orgn.Sheets(1) ..Columns("A:Z").EntireColumn.Hidden = False lastRow = wsDr.Cells(Rows.Count, "J").End(xlUp).Row Set myRange = wsDr.Cells(lastRow, "J").Offset(1, -9) ..Range("A1", .Cells.SpecialCells(xlCellTypeLastCell)).Copy _Destination:=myRange End With Having trouble with the Copy/destination line.....but only on this ONE worksheet.. It works with all the others. The error I get is that paste area is different shape. ...but the destination is only one cell! Please HELP!! Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Month function yields incorrect solution | Excel Worksheet Functions | |||
excel to make the days cary over month to month automaticly | New Users to Excel | |||
Excel 2003 month to month data change grid | Excel Discussion (Misc queries) | |||
copy worksheet from previous month and rename to current month | Excel Programming | |||
transfer cell $ amount to other sheet month-to-month without overc | Excel Discussion (Misc queries) |