_CodeName usage

T

Tetsuya Oguma

Hi all,

The following correctly runs through.

Sub test()
Dim WS As Worksheet
Set WS = ActiveSheet
WS.[_CodeName] = "MySheet"
End Sub

But, if I substitute the above three lines with either one
of the following lines, it spitts out the error "Object
Required." Why???

Worksheets("Book").[_CodeName] = "MySheet"
ActiveSheet.[_CodeName] = "MySheet"

Thanks for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top