???? ID: 210684 - ????? ???????: 20 ??????? 2011 - ??????: 5.0

Excel ??? 1004 ??-???? ?????? ?? ???? ????????? ?????????? ?? ????????? ?????

?????? ??????This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.

?? ????? ??

??? ?? ??????? ???? | ??? ?? ??????? ????

?????

Microsoft Excel ???, ?? ??? ???????????? ?? ????????? ????? ?? ?? ???? ?? ?? originated ?? ??? ????????????? ??? ?? ?????????? ???? ?? ?? ???? ?????? ???? ?? ?? ?? ???? ???, ?? ???? ????? ?????? ??????? ??? ?? ?? ?? ???? ?? ?????? ????? ??????? ?? ???? ??:
'1004' ??-???? ??????:
?????????? ???? ?? ????????? ?????? ???? ???
'1004' ??-???? ??????:
????????? ??????? ?? ???????? ??????? ??????

????

Microsoft ???????????? ?????? ???? ???????? ?? ??? ??? ???? ??, ???? ??? ??? ?? ?????? ?? ?????????? ??? ??? ?????? ???? ?? ????.. ?????? ???????? ?????? ?? ???? ????? ???????? ?? ??? ???????? ????? ??? ?? ???? ?? ????? ???? ???.. ?? ??? ????? ?? ?? ?? ????? ?? ?? ??? ???????????? ???? ?? ?? ??????? ?? ?????? ??? ????? ????? ???????????? ?? ????? ?? ???? ???? ?? ??? ???? ?? ??? ??.. Microsoft ?????? ???????? ?? ????? ????????? ?? ???????????? ?? ?????? ??? ?????? ?? ???? ???.. ??, ?? ?? ???????? ?? ???? ??????? ?????????? ?? ?????? ???? ?? ??? ???????? ??????????????? ?? ?????? ?? ???????????? ????? ?? ??? ??????? ???? ??????..

?? ?????? ?? ?? ???? ?? ?? ?? ????????????? ?? ???? ????????? ??? ??? ?? ??? ????????? ?????????? ?? ??? ???? ???? ?????? ?? ??? ????? ????? ??? ?? ??? ???, ????????????? ??? ?? ??? ??:
Sub CopySheetTest()
    Dim iTemp As Integer
    Dim oBook As Workbook
    Dim iCounter As Integer
    
    ' Create a new blank workbook:
    iTemp = Application.SheetsInNewWorkbook
    Application.SheetsInNewWorkbook = 1
    Set oBook = Application.Workbooks.Add
    Application.SheetsInNewWorkbook = iTemp
    
    ' Add a defined name to the workbook
    ' that RefersTo a range:
    oBook.Names.Add Name:="tempRange", _
        RefersTo:="=Sheet1!$A$1"
            
    ' Save the workbook:
    oBook.SaveAs "c:\test2.xls"
    
    ' Copy the sheet in a loop. Eventually,
    ' you get error 1004: Copy Method of
    ' Worksheet class failed.
    For iCounter = 1 To 275
        oBook.Worksheets(1).Copy After:=oBook.Worksheets(1)        
    Next
End Sub
				

????????

?? ?????? ?? ?? ???? ?? ??? ?????? ?? ?? ??????? ?? ????????? ????????? ?? ???, ??? ????? ????? ??? ?? ??? ??? ???-??? ?? ????????????? ??? ????:
Sub CopySheetTest()
    Dim iTemp As Integer
    Dim oBook As Workbook
    Dim iCounter As Integer
    
    ' Create a new blank workbook:
    iTemp = Application.SheetsInNewWorkbook
    Application.SheetsInNewWorkbook = 1
    Set oBook = Application.Workbooks.Add
    Application.SheetsInNewWorkbook = iTemp
    
    ' Add a defined name to the workbook
    ' that RefersTo a range:
    oBook.Names.Add Name:="tempRange", _
        RefersTo:="=Sheet1!$A$1"
            
    ' Save the workbook:
    oBook.SaveAs "c:\test2.xls"
    
    ' Copy the sheet in a loop. Eventually,
    ' you get error 1004: Copy Method of
    ' Worksheet class failed.
    For iCounter = 1 To 275
        oBook.Worksheets(1).Copy After:=oBook.Worksheets(1)
        'Uncomment this code for the workaround:
        'Save, close, and reopen after every 100 iterations:
        If iCounter Mod 100 = 0 Then
            oBook.Close SaveChanges:=True
            Set oBook = Nothing
            Set oBook = Application.Workbooks.Open("c:\test2.xls")
        End If
    Next
End Sub
				
???:?????? ?????????? ?? ???? ?? ??? ?? ????? ??? ?? ????????????? ?? ?????? ?????? ???? ?? ???? ???? ?????????? ????????? ?? ???? ????

????? ?????????

?? ?????? ?? ?? ???? ?? ??? ??? ?????? ?????????? ?? ????????? ????? ?? ???? ???? ???????? ?? ?? ?? ?????????? ???????? ????? ??? ???? ?? ???, ???? ?????? ???? ?? ??? Excel ?? ??????? ?? ??? ??????? ?? ??? ???, ????? ????? ?? ???? ?????

Microsoft Office Excel 2007

  1. ??? ?? ????????????? ?????, ?? ???? ??? ??? ???????????? ?? ?? ?? ???? ?? ??? ??????
  2. ????????????? ?? ???????? ????, ?? ??? ????? ??? ?? ???, ????, ?? ???? ??? ?????? ????? ???????? ??? ???????? ??? ???
  3. ????? ????Microsoft Office ????? ????-????? ????, ?? ???? ????? ??? ??? ??????.
  4. ?????????? ???????? ???, ?? Excel ???????? ?? ??? ??? ???? ?????
  5. ??????? ?????? ??????????, ????? ???????????? (*.xltx)?? ????-????? ????, ?? ???? ?????????.
  6. ???????? ????????? ???????? ???? ?? ??? ????? ??? ?? ????? ????:
    Sheets.Add ??????: =??\FileName
    ?? ??? ?????\FileName?? ???????? ?? ?????? ???? ????? ???????? ?? ??? ???? ?? ?? ????? ??? ???

Microsoft Office Excel 2003 ?? Excel ?? ????? ???????

  1. ??? ?? ????????????? ?????, ?? ???? ??? ??? ???????????? ?? ?? ?? ???? ?? ??? ??????
  2. ????????????? ?? ???????? ????, ?? ??? ????? ??? ?? ???, ????, ?? ???? ??? ?????? ????? ???????? ??? ???????? ??? ???
  3. ????? ????,?????? ????-????? ????, ?? ???? ????? ??? ??? ??????.
  4. ?????????? ???????? ???, ?? Excel ???????? ?? ??? ??? ???? ?????
  5. ??????? ?????? ??????????, ????? ???????????? (*.xlt)?? ????-????? ????, ?? ???? ?????????.
  6. ???????? ????????? ???????? ???? ?? ??? ????? ??? ?? ????? ????:
    Sheets.Add ??????: =??\FileName
    ?? ??? ?????\FileName?? ???????? ?? ?????? ???? ????? ???????? ?? ??? ???? ?? ?? ????? ??? ???

??????

Microsoft ?? ?????? ?? ?? ?? ?? ?? Microsoft ???????? ??? ?? ?????? ?? ?? "???? ???? ???? ???" ?????? ???????? ???..

???? ???? ???? ??:
  • Microsoft Office Excel 2007
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Excel 2000 Standard Edition
  • Microsoft Excel 97 Standard Edition
  • Microsoft Office Excel 2003
  • Microsoft Excel 2010
??????: 
kbprogramming kbmacro kbautomation kbvba kbexpertiseinter kbbug kberrmsg kbpending kbmt KB210684 KbMthi
???? ?????? ???????????? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:210684  (http://support.microsoft.com/kb/210684/en-us/ )