View Single Post
 
Old 06-11-2014, 12:57 PM
BobBridges's Avatar
BobBridges BobBridges is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Yes! You can do almost anything in a macro—and definitely that.

(Off-hand I can't think of anything I can't get a macro to do that can be done at all, barring such things as "raise my children" and "pray". But as soon as I scratch "almost", someone will think of an exception. So I'll stick with the cautious construction.)

An MS-Office macro is written in the VBA programming language. All programming languages are sort of like algebra; they're full of very exact definitions for every symbol, and if you've never done one they can look intimidating, but once you get the hang of it you can use those symbols to give explicit instructions to Excel and feel that you really do know what you're doing.

If you're interested in learning, I suggest you post the code that you recorded, and I (or someone) will give you some idea of what each statement does. Or at least the first few statements, if it's long. Then I'll suggest a change or two, a change that will be simple for you to execute but that will have some immediate and obvious result. That, for me when I'm learning a new programming language, is a big step forward in feeling that I'm more or less in control; there's more to learn but at least I see that I can do this, you see.

From there we can proceed until you have it working the way you want, and understand it so you'll be able to do still more the next time.
Reply With Quote