Skip to content

Words Other Than Declarations #1

Open
@ls-2037

Description

@ls-2037

Hi,

I have been using this recently with a large Access project and it's been working great. I wanted to start a discussion here about handling words other than declarations. The VBE will also adjust the case of GoTo labels and object properties (Form.top vs Form.Top), for example. It seems to adjust the case of any word that's not in a comment or string.

Prior to using this addin I wrote a tool that read manually written case definitions from a string and wrote them into a block that was never compiled, as shown below.

#If False Then
    Dim X
    Dim Y
    Dim Z
#End If

This allowed me to also deal with predefined words that were not legal variable names in VBA (but could be affected by the case changing as property or method names of objects in libraries - such as To or Next), and the RegEx in this addin picks them up fine. However, it would probably make more sense to broaden the RegEx to gather these additional words automatically the same way it does declared variables.

Are you accepting pull requests on this project? If so, do you have any preference on how to handle this? I'll probably implement something for my own use, and I'd like to do it in a way that it can make it back upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions