+ Reply to Thread
Results 1 to 2 of 2

VBAProject name compile error, not defined at compile time

  1. #1
    Matthew Dodds
    Guest

    VBAProject name compile error, not defined at compile time

    How do I make this work?

    If Not generalFunctions.isOpenWkb(strWkbStat) Then
    Workbooks.Open (strPath & strWkbStat)
    Call generalFunctions.addReference(strPath & strWkbStat)
    End If
    Set wkbStat = Workbooks(strWkbStat)

    Call osteocht.chartIt.topPlot(Target)

    This code opens workbook strWkbStat and establishes a reference to it
    so I can call the code in the VBAProject called osteocht.

    Problem is that this reference is not established at compile time, so
    the perceived variable called osteocht (which is the name of the
    VBAProject where the code I'm calling sits) is called as being not
    defined ... end of party.

    How do I get around this

    Thanks in advance for getting me out of this empasse!

    Matthew


  2. #2
    Bob Phillips
    Guest

    Re: VBAProject name compile error, not defined at compile time

    You could try and force a compile in your code

    Application.VBE.CommandBars.FindControl(ID:=578).Execute


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "Matthew Dodds" <[email protected]> wrote in message
    news:[email protected]...
    > How do I make this work?
    >
    > If Not generalFunctions.isOpenWkb(strWkbStat) Then
    > Workbooks.Open (strPath & strWkbStat)
    > Call generalFunctions.addReference(strPath & strWkbStat)
    > End If
    > Set wkbStat = Workbooks(strWkbStat)
    >
    > Call osteocht.chartIt.topPlot(Target)
    >
    > This code opens workbook strWkbStat and establishes a reference to it
    > so I can call the code in the VBAProject called osteocht.
    >
    > Problem is that this reference is not established at compile time, so
    > the perceived variable called osteocht (which is the name of the
    > VBAProject where the code I'm calling sits) is called as being not
    > defined ... end of party.
    >
    > How do I get around this
    >
    > Thanks in advance for getting me out of this empasse!
    >
    > Matthew
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1