How to replace the comment text in a LabChart file automatically?

If you like to replace parts or the complete comment text in your LabChart file, similar to Find/Replace in a word document, you can use the attached macro. Please note, the macro does not search for regular expressions, but for a given string of characters. It is not case sensitive.

 
For example "ach" will find "dose ACh 10e-2" or "cockroaches" but not "a cheese".
 
When executing the macro "ReplaceStrInComments" two dialogs will pop up for you to enter the find string and then the replace by string. You need to enter a value for find, otherwise the macro stops. If you leave the replace by string empty, the find string will be deleted from the comments.
 
When finished the macro brings up a message about how many comments have been replaced.
 
Please note: While the macro has been written and tested on LabChart 8 only, the macro is provided "as is" and "with all possible faults". To use the code is entirely your responsibility. Please observe common sense and first try it on the provided file, later on at a copy of one of your files until you are confided the macro does what you expect. You should be familiar with VBScript to edit the macro manually.

For further technical assistance with this or any other issue, please contact ADInstruments Technical Support by clicking HERE.