I have a Macro running to change the indent levels as per below and getting "Runtime error 1004 - Unable to set IndentLevel property of the Range class"
I know that I am getting the error because there is only data until B156, if I change the Macro to run from ("B10:B156"), I don't get the error.![]()
Sub IndentLevelsProjectPlan() Dim cell As Range For Each cell In Sheet7.Range("B10:B250") 'change the range if more tasks are added cell.IndentLevel = cell.Offset(0, 10) Next End Sub
As other people will be working with the spreadsheet and might add additional data, I decided to give them some space to maneuver.
How can I keep the current macro ("B10:B250") running, without the error?
Bookmarks