I\'m not much of a Visual Basic person, but I am tasked with maintaining an old VB6 app. Whenever I check out a file, the editor will replace a bunch of the uppercase varia
Continuing from Mercator's excellent answer...
I'd recommend:
Now base you're the real differences rather than the 'auto' changes that VB6 has tried to apply.
Since I always find this thread first looking for a solution to messed-up casing, here is one Simon D proposed in a related question:
If you just need to fix one variable's casing (e.g. you accidentally made a cOrrectCAse
variable and now they are all over the place), you can correct this for good by adding
#If False Then
Dim CorrectCase
#End If
to the beginning of your module. If you save the project and remove the statement later, the casing remains correct.
Using Excel VBA I often accidentally change all Range.Row
to Range.row
by carelessly dimming a row
variable inside some function - with the help of Simon D's solution I can fix this now.
Enums are even worse. Getting the case wrong anywhere the enum is used changes the case of the definition.
DJ is spot on... VB always changes the case of variables to match the original declaration. It's a 'feature'.