I run into the vague “400” error with a trivial visual basic script in excel. I commented out everything, just leaving the single line in my method:
ActiveCell.EntireRow.Insert
Here the “complete” (stripped) method (which is keybound to ctrl+shift+n):
Sub NewUserStory()
'
' NewUserStory Macro
' Creates a new empty user story with pasted formulas for remaining work, and cumulative planning information
'
' Keyboard Shortcut: Ctrl+Shift+N
'
ActiveCell.EntireRow.Insert ' Insert a new row above selected row
End Sub
If I have any cell selected, and I press the macro, the debugger stops on my breakpoint. When I step into the method, I immediately get the popup with error “400”. I am 100% sure that there is no other method that is executed.
I’ve been google-ing this for the last 2 hours, but nothing that solved the problem. Sorry for the lame question, but I need the bloody macro for my work :).
Many thanks in advance!
PS: If anybody can provide an alternative for ActiveCell.EntireRow.Insert, I am all ears too of course!
Possibly you have content in the last row of the sheet you’re trying to insert the row into?
That would cause an error.