+ Reply to Thread
Results 1 to 4 of 4

"Insert method of Range class failed" in Shared mode

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    23

    "Insert method of Range class failed" in Shared mode

    Hi,

    I get a "run-time error '1004':Insert method of Range class failed" message when I run this macro in workbook shared mode. It works fine in normal mode.

    Can you help me ?
    Thanks,
    Bart

    Please Login or Register  to view this content.
    Last edited by BartDeHertogh; 11-05-2010 at 07:31 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: "Insert method of Range class failed" in Shared mode

    You cannot insert blocks of cells in shared workbooks, only entire columns or rows.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    01-11-2010
    Location
    Belgium
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: "Insert method of Range class failed" in Shared mode

    OK, thanks

  4. #4
    Registered User
    Join Date
    04-18-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: "Insert method of Range class failed" in Shared mode

    Please help me with my code also I am receiving same error message.

    Private Sub Ipasok2_Click()
    Worksheets("sheet1").Range("B59").Value = 1
    Dim InsertVar(9)
    For i = 1 To 9
    InsertVar(i) = Worksheets("sheet1").Cells(57, 1 + i).Value
    Next
    Worksheets("sheet3").Range("a5").EntireRow.Insert
    For i = 1 To 5
    Worksheets("sheet3").Cells(5, i).Value = InsertVar(i)
    Next
    For i = 6 To 7
    Worksheets("sheet3").Cells(5, i + 6).Value = InsertVar(i)
    Next
    For i = 8 To 9
    Worksheets("sheet3").Cells(5, i + 8).Value = InsertVar(i)
    Next
    'Worksheets("sheet3").Select
    'ActiveSheet.Range("ComData").Select
    Worksheets("Sheet3").Range("ComData").sort _
    Key1:=Worksheets("Sheet3").Range("A4")
    'ActiveCell.Selection.sort Key1:=Range("a4"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal

    Worksheets("sheet1").Select
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1