• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

rename worksheet

Dalia

Member
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
 
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"
 
Back
Top