

Perhaps there is a way to programmatically have VBA code establish the necessary references in various environments? I believe the two environments I was working in were both some Office 20# variant.Īnd I see now on the 2nd point of "enumerations" I concur that defining the necessary constants up front makes more sense to me too. It is a very user-friendly development environment. You will develop, test and modify VBA procedures (macros) in the Excel Visual Basic Editor (VBE).
VISUAL BASIC FOR EXCEL STARTER HOW TO
Rather than once again setup different PPT references on the 2nd computer, I opted to refactor the tool to utilize the more generic late-binding (as I support many users whom expect tools to work out-of-box and don't know how to setup VBA references themselves). When you want Excel to do some work for you, you open the Visual Basic Editor and you write the instructions in a language that Excel understands VBA (Visual Basic for Application). Therefore I added the necessary PPT references to make early binding work, then ran into some breakage when trying to run the same tool on another computer. xlsm file and also manipulating Powerpoint files in that same code. It was a while ago but my recollection is that I was writing VBA in an Excel. not second-hand) the first point of "early-binding not working in some different MS Office environments". Hmm, I guess I am just a little confused then because I myself have had experienced (i.e. (in my real case there are up to several pages between both keywords) Once you start working on data probably you need to present it to someone, and a chart is one of the best ways for this. The first 2 lines type "Hello and Goodbye" for you and the remaining 'real' code selects everything between Hello & Goodbye, ie " and ". My problem is that I cannot adapt this same code to work when it is running from within Excel's VBA and the whole aim is of course to have one file/macro to do everything!īelow is working demonstration code within Word. I have found the following code which works perfectly within Word. This section can change in length so using fixed line ranges in VBA will not work. My problem is that I need to select a range of text between two keywords and format them. I have made a VBA macro which then copies the cells into Word, converts the tables to text, formats them, etc. I have therefore prepared them in Excel where they can be manipulated. Please bear with me everyone, it may look like a Word question but it is really to do with Excel so please read on! Basically, I have a series of complex text forms which simply cannot be adjusted in Word.
