New name of class module is not updated

Fantast

Registered User.
Local time
Today, 13:33
Joined
Dec 13, 2011
Messages
41
Hello,

I have this weird issue, which is not causing me any errors, but is kind of weird imo. I have a class module which was named CDoubleListbox. The class module is cused inside a form class object in the following way:
Code:
Public clsRegionLb As New CDoubleListbox
Today I decided to change the module class name from CDoubleListbox into CDoubleListBox. I expected all the code to be automatically updated from CDoubleListbox into CDoubleListBox, but that didn't happen. Even more: if I try to change the b into a capital B in the code, it will be changed back into a b again.

As I said, it is not causing problems as the code seems to still run fine, but if there is a way to get the class module name updated to its new form in the code, that would be nice. Anyone knows a way to do so?

Thanks in advance,
Fantast~
 
Try This.

Select CDoubleListbox

Press Shift F2. This will take you to the original use of the word.

Change it there and I think it will cascade the change everywhere.

Please let me know how it goes.




 
Thank you for your suggestion RainLover. Unfortunately it did not work.

However, somehow it did make me try something else, which did work. I guessed that maybe it is a shortcoming of Access where a change in the case of the characters was forgotten to be taken into account when updating all the references to a class. So I took the following actions:

First change the class module from CDoubleListbox into CDoubleListBoxX
Then change the class module name again from CDoubleListBoxX to CDoubleListBoxThis way there is not only a character case change, but also an actual change in the length of the class name and the changes are cascaded into the code! Seems like a bug to me, but at least it is easy to solve. Hope it helps others as well.

Regards
Fantast~
 
Just for the record, what version are you using.

I tested this in 2003 and it worked.

Glad you solved the problem.
 
Aye, good point, should had mentioned the version as well.
Office professional plus , Access 2010. OS: Win 7.
 
Aye,

Scottish are we. Nice warm place to visit in winter. One of my dreams is to attend the Tattoo in Edinburough. But that will never happen to a Square guy like me.

2010. I see. I don't like it. The way Microsoft is going I am going to have to convert to PHP and MySQL. Something I should have done years ago.
 
Actually Dutch, but I have been to Edinburgh. Unfortunately it wasn't during the Tattoo performances, but still very recommendable ;)

I actually started in PHP and MySQL, and I still prefer them any day any time over VBA Access. But this is my company laptop, and we simply have to use the tools which are provided to us~ In some ways I did get used to it over the past year and I guess it is workable :P
 
Dutch.

I never would have guessed. Your English is better than mine.
 

Users who are viewing this thread

Back
Top Bottom