what am i doing Wrong?
Dim appExcel As Excel.Application
Dim bigwrkbk As Excel.Workbook
Dim bigsheet As Excel.Worksheet
Dim newworksheet As Excel.Worksheet
Dim titlebk As Excel.Workbook
Dim titlesheet As Excel.Worksheet
On Error GoTo err_FD
'Dim newworksheet As Excel.Worksheet
'Dim AppWrkBk As Excel.Workbook
Set appExcel = CreateObject("Excel.Application")
appExcel.Visible = True
Dim row As Integer
Dim col As Integer
'the already open sheet is now called bigsheet
Set bigwrkbk = ActiveWorkbook
Set bigsheet = ActiveSheet
'COPY THE 2500 ROWS
bigsheet.Activate
Range(Cells(1, 1), Cells(2500, 1)).Select
Range(Cells(1, 1), Cells(2500, 1)).Copy
' we add a sheet to the bigwrkbook, calling it newworksheet
Set newworksheet = bigwrkbk.Sheets.Add
' we activate newworksheet and paste in the 2500 rows copied form bigsheet.. this works
newworksheet.Activate
ActiveSheet.Paste
'now we introduce another workbook and sheet
Set titlebk = appExcel.Workbooks.Open("c:\third.xls")
Set titlesheet = titlebk.Worksheets("third")
' i want to copy first two rows of Titlesheet
titlesheet.Activate ' this i think is what we want.. tho i don't know if it does anything
titlesheet.Range(Cells(1, 1), Cells(2, 1)).Select 'BOMBS when running tho it does compile
titlesheet.Range(Cells(1, 1), Cells(2, 1)).Copy 'BOMBS WHEN RUNNING tho it does compile
' and paste those two rows onto the top of newworksheet but we don't get this far
newworksheet.Activate
newworksheet.Range(Cells(1, 1), Cells(2, 1)).Select
Selection.Insert shift:=xlDown
' i can see the titlesheet rows are never selected... of course, since the code Bombs there
MANY THANKS,
Bookmarks