ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   _CodeName usage (https://www.excelbanter.com/excel-programming/279822-_codename-usage.html)

Tetsuya Oguma[_3_]

_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



All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com