Thread: _CodeName usage
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tetsuya Oguma[_3_] Tetsuya Oguma[_3_] is offline
external usenet poster
 
Posts: 7
Default _CodeName usage

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.
---
Tetsuya Oguma, Sydney, Australia