LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Some worksheet returns NULL for CodeName property. Why?

To illustrate my problem, sample code given below:

set oEx = New Excel.Application
set oBk = oEx.Workbooks.Open("MyBook.xls")

dim oSh as Excel.Worksheet
For Each oSh In oBk.Worksheets
Debug.Print oSh.CodeName
Next

Sometimes I could not refer to the codename of worksheet. After I
intentionally create a tiny macro in the "MyBook.xls" and delete it, I could
refer to the codename of the sheets by the above code. I need to always
refer to the codename in my current project. Someone knows how?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Createobject returns null in Excel [email protected] Excel Discussion (Misc queries) 1 March 27th 06 04:04 AM
Using Worksheet Codename to Determine Worksheet Existence David Copp[_3_] Excel Programming 4 July 2nd 04 08:00 AM
Chart property Codename??? theycallhimtom Excel Programming 0 May 11th 04 06:22 AM
The Tricky Blank CodeName Property & Excel 2002 Bob[_43_] Excel Programming 9 December 26th 03 02:08 AM
Worksheet codename Andy Excel Programming 4 December 2nd 03 04:12 PM


All times are GMT +1. The time now is 02:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"