Hi...NUB here
Excel Office 2010
so I have a macro that wont work once the workbook is shared. the error is:
Run Time error '1004'
Insert method of Range class failed
The code is:
Sub INSERT_PROJECT()
'
' INSERT_PROJECT Macro
'
'
Range("A2:E10").Select
Range("E10").Activate
Selection.Copy
Rows("18:18").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
Whats interesting is that the first line: Sub INSERT_PROJECT() is highlighted in the debugger...
some other notes:
Any help much appreciated!
K
Excel Office 2010
so I have a macro that wont work once the workbook is shared. the error is:
Run Time error '1004'
Insert method of Range class failed
The code is:
Sub INSERT_PROJECT()
'
' INSERT_PROJECT Macro
'
'
Range("A2:E10").Select
Range("E10").Activate
Selection.Copy
Rows("18:18").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
End Sub
Whats interesting is that the first line: Sub INSERT_PROJECT() is highlighted in the debugger...
some other notes:
- The 'A' column has a drop down list inserted at A2. I'm wondering if this might be causing the problem as unsupported?
- the contents of the drop down list are in the last sheet of the workbook.
- everything works great when sheet is not in shared mode.
- nothing seems to be locked or protected.
- i have tried the following:
- deleting the drop down.
- adding an empty line above where the insert is.
- playing with the code. can delete the last line and macro works, but still not in shared.
- tried getting rid of "select" in the code as recommended but cant get that to work at all, likely as I dont know VBA well...
Any help much appreciated!
K