VB6 Editor changing case of variable names

前端 未结 10 954
迷失自我
迷失自我 2020-12-08 13:24

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

10条回答
  •  隐瞒了意图╮
    2020-12-08 13:59

    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.

提交回复
热议问题