byronwall / bUTL

Excel add-in with helpers for charting, formatting, and general pain points
http://byroni.us/bUTL
MIT License
16 stars 3 forks source link

Create xlam from src is broken #39

Closed RaymondWise closed 9 years ago

RaymondWise commented 9 years ago

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

byronwall commented 9 years ago

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.

RaymondWise commented 9 years ago

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
RaymondWise commented 9 years ago

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

byronwall commented 9 years ago

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:

RaymondWise commented 9 years ago

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

RaymondWise commented 9 years ago

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.

byronwall commented 9 years ago

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.

RaymondWise commented 9 years ago

Should be fixed by https://github.com/byronwall/bUTL/pull/40

byronwall commented 9 years ago

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