Macro with drop down disabled in Shared workbook

SNOWK1026

New Member
Joined
Nov 3, 2017
Messages
1
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:

  • 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
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top