D Dalia Member Apr 21, 2015 #1 I am receiving error when am trying to name a sheet in activeworkbook. the error is subscript out of range. my macro code as followa Code: Sub Macro2() Sheets("Exercise 5").Name = "sheet1" End Sub
I am receiving error when am trying to name a sheet in activeworkbook. the error is subscript out of range. my macro code as followa Code: Sub Macro2() Sheets("Exercise 5").Name = "sheet1" End Sub
Luke M Excel Ninja Staff member Apr 21, 2015 #2 Verify that a) there is a worksheet with the exact name "Exercise 5", and not " Exercise 5" or "Exercise_5" b) that there is not already another sheet named "Sheet1"
Verify that a) there is a worksheet with the exact name "Exercise 5", and not " Exercise 5" or "Exercise_5" b) that there is not already another sheet named "Sheet1"