Thread: Macro Help
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Neil Holden Neil Holden is offline
external usenet poster
 
Posts: 163
Default Macro Help

jacob kindly helped me with the following code below.

This works a treat but i need it to do a couple more things.

I need B10 to go into an external closed excel into column A and then the
rest to appear in column B onwards.

Please Help.

Sub Macro()
Dim lngRow As Long, rngTemp As Range
Dim wbBook As Workbook, wsDest As Worksheet

Set rngTemp = ActiveSheet.Range("A1:A3")

Set wbBook = Workbooks.Open("<fullpath\<filename.ext")
Set wsDest = wbBook.Sheets("Sheet1") 'Destination sheet
lngRow = wsDest.Cells(Rows.Count, "A").End(xlUp).Row + 1
rngTemp.Copy wsDest.Range("A" & lngRow)

wbBook.Close True

End Sub