Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Copy Excel Sheet From One Workbook To Another

Status
Not open for further replies.

Rob94

Programmer
Mar 30, 2004
19
US
The code snippet below works under NT, but is failing when I run this in Windows XP:

Code:
'copy current invoice to the master invoice 
'workbook, place at beginning of workbook
xlsheet.Copy(xlMasterWorkbook.Sheets(1))

if err.number <> 0 then
  MsgBox "Error " & Err.number & ": " & Err.description
end if
When I run this, I get the following error:
"Error 1004: Copy method of Worksheet class failed"
Any suggestions would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top