PDA

View Full Version : is there a way to clear macros from a vbscript


Chudson
08-17-2004, 08:42 AM
I am trying to clear or delete a macro and then reuse it.
I have tried setting the macro to ""
vbld_AllMacros.Item("filename").value = ""
but this results in a tab character then the value

ex:
instead of:
c:\test.txt
I get
c:\test.txt


I also have tried settting the value to null and that didnt work.

Thanks in advance.
Chris

Chudson
08-17-2004, 09:01 AM
'this sets the macro equal to "" & tab
vbld_AllMacros.Item("filename").value = ""
'This removes the tab
vbld_NextDelimValue("filename")


full example
set project level macro with no value:
filename

'in the script
'this clears the value in the macro if it has one and then
'sets the new value
if vbld_AllMacros.Item("filename").value <> "" then
vbld_AllMacros.Item("filename").value = ""
vbld_NextDelimValue("filename")
end if

vbld_AddDelimValue "filename", myfile