Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Copy and Rename a Worksheet in the Same Workbook?

(image) Hey, Scripting Guy! Iโ€™d like to copy one of the worksheets in an Excel workbook and then paste that copy into the very same workbook; once itโ€™s pasted it, Iโ€™d like to rename it. Can I do that?-- JG(image) (image) (image) Hey, JG. Of course you can do this; after all, if you can do something in Excel itโ€™s almost 100% ...

How Can I Clear a List Box in an HTA?

(image) Hey, Scripting Guy! How can I clear a list box in an HTA?-- AK(image) (image) (image) Hey, AK. For those of you who arenโ€™t familiar with the term, an HTA - among other things - is a way to use Internet Explorer to provide a graphical user interface for your scripts. (If that still doesnโ€™t answer your questions, donโ€™t despair...

How Can I Add a Word to a Text File if That Word Isnโ€™t Already in the File?

(image) Hey, Scripting Guy! How can I check a text file to see if a word appears in that file and, if it doesnโ€™t, add the word to the file?-- JO(image) (image) (image) Hey, JO. We seem to have gotten quite a few questions on this topic lately. You mentioned adding words to a custom dictionary for Microsoft Word; other people mentioned ...