Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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).E xecute


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Matthew Dodds" wrote in message
oups.com...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Visual Basic: Compile error: Sum or Function not defined Dmitry Excel Worksheet Functions 12 April 3rd 06 07:28 AM
Incremental Numbering: Compile Error - Variable not defined BEEJAY Excel Programming 9 September 27th 05 08:59 PM
Debug/Compile VBAProject not available milly Excel Programming 3 July 21st 05 08:58 AM
Variable not defined compile error Phil Hageman[_4_] Excel Programming 4 June 17th 05 01:52 PM
Compile error, variable not defined davegb Excel Programming 5 May 19th 05 04:41 PM


All times are GMT +1. The time now is 03:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"