View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Excel_Expert Excel_Expert is offline
external usenet poster
 
Posts: 4
Default Append Excel Data from a named Range to an Exceldatabase

Hi

Can you tell me what line doesn't seem to be working? Is there an
error you face?

Oh... I now see the error. I think I didn't write this line of code
rngCopy.Copy

Just re-copy the code and try running it.

Sub CopyDataRange()
Dim rngCopy as Range
Dim wbDest as Workbook

set rngCopy = Range("Data")
set wbDest = Workbooks.Open(Range("location")


rngCopy.Copy

'Assuming Data on Database Sheet starts from Column A
wbDest.Sheets("Database").Range("A65536").offset(1 ,0).PasteSpecial
xlPasteAll
Application.CutCopyMode = False
wbDest.Save


msgbox "Completed"
End Sub