Skip to content

LoadCombo.cls is being imported as a Module not a Class #23

Description

@alishrih

Describe the bug
While attempting to import LoadCombo.cls into a VBA project, it will be imported as a Module not a Class. Additional header lines will be added, see first screenshot below.

To Reproduce

  1. Download the code as zip from github and unzip locally.
  2. In Excel, open a VBA Project.
  3. Right click the project name and select "Import File...".
  4. Find the file "LoadCombo.cls" and hit open.

Expected behavior
A LoadCombo class should be created instead of a LoadCombo Module and without the additional header lines.

Screenshots
image
image
image

Additional context
I'm going to leave this in here just in case someone else needs it. This is not a bug per se, as I believe the code will work just fine if you create the class manually and copy/paste the code into it (minus the added header lines.) This happens because the line endings in the file LoadCombo.cls are UNIX-style (LF) vs the Windows-style (CR+LF). See this from Tim Hall.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions