wallstreetakp.blogg.se

Visual basic for excel starter
Visual basic for excel starter







visual basic for excel starter

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) 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.









Visual basic for excel starter