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.
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.
You cannot insert blocks of cells in shared workbooks, only entire columns or rows.
Everyone who confuses correlation and causation ends up dead.
OK, thanks![]()
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks