Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-26-2005, 04:12 PM
lherz lherz is online now
Registered User
 
Join Date: 07-21-2005
Posts: 15
Clearing the Contnet of all Application macros

Is there a way to clear all application macro contents from within the VBP tool? I have a step that creates/populates macros at the beginning of the project via an XML file generated from a SQL query, but I would like to make sure that the macros are empty or non-existant prior to the step to populate them. This is not a critical issue, but in the event that there is an error with the macro population, some of the macros may contain incorrect data (from a previous run) and cause annoying error messages.
Reply With Quote
  #2  
Old 09-26-2005, 04:55 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Depending on what you mean by 'application macro contents', one of the following should work (in a Run Script action [VBScript sample code]):

Application.Macros(vbldMacroTemporary).Clear

Application.Macros(vbldMacroProject).Clear

Application.Macros(vbldMacroGlobal).Clear
Reply With Quote
  #3  
Old 09-26-2005, 05:08 PM
lherz lherz is online now
Registered User
 
Join Date: 07-21-2005
Posts: 15
That helps, and I can work with that. It will take a bit of re-coding though.

What I was really looking for was a way to remove the values from all of the existing project macros, but leave the macros. (The code was originally written with macro.item to set the value instead of macro.add)
Reply With Quote
  #4  
Old 09-26-2005, 05:17 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
For Each macro In Application.Macros(vbldMacroProject)
macro.Value = ""
Next
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 12:02 AM.


Copyright © 1999-2023 Kinook Software, Inc.