Search This Blog

Friday, August 20, 2010

VBA Quick Tip

I am writing a quick select case this am and remembered something I thought I'd share with you. Don't worry about closing quotes around strings when it is the last character on the line. The VBA editor will do it for you when you hit the enter button. So my shortcut was to copy the beginning of the plotstyle name and Case statement to the clipboard and for each new line I simply paste, add the end of the style name and hit "Enter" key. The VBIDE adds the close quote for me.

Ex:
Here is what I paste from the clipboard - Case "Black-
I added the word: XBold and hit return. The result is shown below:

Case "Black-XBold"

No comments: