Hi all,
I'm required to use a worksheet's codename to store its unique settings. (Excel name is useless since my clients can change it.)
Unfortunately, the CodeName property of a newly created worksheet are not initialized until the VBA Editor is opened at least one time (not good since not all of my clients are programmatically savvy) or a force recompile occurs. The CodeName is simply an empty string until one of those events occurs.
More information on this "feature" can be found here: http://www.office-archive.com/2-exce...925ebceecf.htm
I have found the following solutions on Google but both of them have issues:
1) Quickly display and hide the VBE. (I've tested this, and it just looks strange and a little unprofessional. However, if it's the least buggy solution, I have no choice.)
2) Programmatically force a recompile
Unfortunately, this block of code doesn't even compile on some setups - namely Excel 2007.Please Login or Register to view this content.
As a result, I'm hoping to get some feedback on other potential solutions on this CodeName property issue.
Perhaps, there's another way to force a re-compile?
Anways, thanks in advance.
Bookmarks