byronwall/bUTL

Create xlam from src is broken

RaymondWise opened this issue · 9 comments

I'm getting compile error - it might have to do with comments not commented out?

Are you on the most up to date version of master? If I clone it from the GitHub repo and run the xlam from src script, it runs and creates a working xlam file.

I know that a previous commit did not include some of the files needed and the script failed.

If you are getting issues related to compilation, are they in the bUTL.xlam or in the build manager.xlsm file? If it's the add-in, it might be related to a merge that edited the source in a way that did not produce valid code.

It looks like it's having problems creating the class modules. In bUTL it's having problem with the top line VERSION 1.0 CLASS

This is a fresh download

This is the code in the code/butl.vba

VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "bUTL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'---------------------------------------------------------------------------------------
' Module    : bUTL
' Author    : @byronwall
' Date      : 2015 08 12
' Purpose   : Code has been removed with the text boxes.  Module might be deleted next.
'---------------------------------------------------------------------------------------

Option Explicit

I removed butl.vba from code and it fails on the other class module.

Interesting. I have the same file contents.

Can you manually step through the build manager code and see what error it gives? That is, don't use the script but manually run the macro yourself.

The macro to run is called: CreateFileFromPackageAndCode. I would add a breakpoint at lines:

  • .VBComponents.Remove .VBComponents(i) to verify that all of the modules are being removed correctly. You will see them go away over in the sidebar, and you should be left with only the Document objects.
  • wkAddIn.VBProject.VBComponents.Import FSO.BuildPath(strPath, strFile) to verify that each module is being brought in correctly. I assume this is the step that is giving an error on the class modules.

Sure, I'll give that a try in a couple hours

Fails at wkAddIn.Save pulling the

Compile error: Expected: end of statement

In module bUTL red highlight first line "VERSION 1.0 CLASS"

It didn't add bUTL or bUTLChartSeries as class modules - just standard modules
butlerr

Maybe it's because I don't have it installed as an add-in? It just loads when the file is opened.

So one possibility is that something about the file or VBE is not triggering it to load as a class module. I know that traditionally the VBE will export the different file types with different extensions.

It might be using the file extension to determine type. Not sure why that would have changed though. If you change the extension to .cls does it import as a class module?

You will also have to change the line to allow for cls and vba files.

If you want to try that, see PR #40 which includes all of the changes to make that happen.

Should be fixed by #40

Glad this solves the problem. Hopefully for good. Sorry for the inconvenience.