Posts by usacomp2k3

    Re: "excel 4.0 Macro" Warning

    Quote from RichardSchollar

    Are you also searching in hidden workbook names? If not, then checking any such names may be worthwhile too...

    Well there you go. Thanks a bunch. There was one with a get.document name.

    Re: "excel 4.0 Macro" Warning

    Quote from RichardSchollar

    Do you have any defined names using XLM4 functions? Such names could use XLM4 like GET.CELL and GET.DOCUMENT. If you want to search in code, then you just need to search for the text "ExecuteExcel4".

    All 1352 names that are in the workbook seem to be valid. (ex: "=Standard!$D$98"). I did a search through the workbook, and there were no 'get' references in either the values or forumulas. Also, a search for "execute" in the code did not return anything, neither did "excel4" or even "excel" (other than the word "excel" in 1 comment line).
    Thanks for the ideas though.

    Re: "excel 4.0 Macro" Warning

    Quote from AAE

    The function you are no longer using must be either an Excel add-in or a custom function. You will have to go into the VB Editor and manually delete any modules with code or remove the add in.

    Thanks for the reply. Unfortunately, it's not an Excel add-in:
    [Blocked Image:][Blocked Image:]
    Re: a custom function, if it is, I have no idea which one. I have over 2500 lines of code in this workbook, so going through every line to find it is not a trivial matter, not to mention that I don't even know what to look for.

    I keep getting this warning. I temporarily used a 4.0 macro, but found a better way to do it, so I no longer am using that function. How do I remove whatever it is that is calling it so that user's don't have to see this message. There is a small probability that something else somewhere is calling a 4.0 command, but I have no idea how to find out what that is.
    [Blocked Image:]
    I've checked the references, and excel 4.0 Macro's aren't listed, and I'm pretty sure they were before when I was using them.[Blocked Image:]

    So basically I have a report that is generated that is broken down into 4 or 5 headers. What I want is basically a way to manually add page breaks for 2 conditions:
    *That no section starts at the end of one page and ends on the next; I want to just insert a page break before the section so it is all on the next page.
    * That if the first section is more than a page long, that it inserts a new header saying 'section 1 continued..' basically.

    I've been able to code it and it functions how I want. However, it takes about 20-30 seconds on a dual-core computer with 2gb of memory to insert these page breaks, so I thought I'd get some expert advice on where the slow-downs are and how I could go about tightening up the code to get it to run faster. (this subprocedure is #15 of 15 when generating the report, and the rest take between 2 and 5 seconds combined).

    The page is broken up into the following named sections:
    *Q_Options (not always present)
    *Q_Recommended (not always present)
    These are all variable length depending on the data used to generate the report and the type of report generated (which is why 2 of them aren't always there).

    That's all that I can think of. Let me know if I left out any explanations, and thanks a bunch for the help!

    Well I think I got it working well enough. I replaced the page_break lookup code with the following, and it works like a champ now:

    'get the row numbers of each page break
    Names.Add "HPBreaks", "=GET.DOCUMENT(64)", False
    page_break = [HPBreaks] 'so using evaluate to fill a variant array
    ReDim Preserve page_break(UBound(page_break) + 2)
    For i = UBound(page_break) - 1 To 1 Step -1
        page_break(i + 1) = page_break(i)
    page_break(1) = 0
    page_break(UBound(page_break)) = Range("A65536").End(xlUp).Row

    Hope this helps someone else maybe.