Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-11-2005, 07:56 AM
AndyFarr AndyFarr is online now
Registered User
 
Join Date: 08-12-2004
Posts: 16
Determin if Macro is Undefined in Project Script

How can I Determine if Macro is Undefined in a function in a Project Script.

I have a Function that I wish to call multiple times but for it to only run if it has not already run.

Andy
Reply With Quote
  #2  
Old 08-11-2005, 08:21 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Function IsMacroDefined(name)
IsMacroDefined = Not vbld_AllMacros()(name) Is Nothing
End Function
Reply With Quote
  #3  
Old 08-11-2005, 09:51 AM
AndyFarr AndyFarr is online now
Registered User
 
Join Date: 08-12-2004
Posts: 16
Smile Thanks

I did try this but just using the TemporaryMacros collection but it failed.

Was unclear why?

All working now

Andy
Reply With Quote
  #4  
Old 08-11-2005, 10:04 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Not sure. This works equally well here for temporary macros:

Function IsMacroDefined(name)
IsMacroDefined = Not Application.Macros(vbldMacroTemporary)(name) Is Nothing
End Function
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 04:15 PM.


Copyright © 1999-2023 Kinook Software, Inc.