Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2004
    Posts
    21

    Unanswered: Macro in Excel 2002 Problem

    Hi there

    I have been using Microsoft Excel 2002 to write my Macro. I use this macro to process my data. However, when I export this macro to a computer with Microsoft Excel 2000,the code is the same but when I run the macro in Microsoft Excel 2000, the macro does not run correctly and there are errors. Can somebody tell me why and how to go about solving this.
    Thank you.

  2. #2
    Join Date
    Feb 2004
    Location
    Charlotte, NC
    Posts
    79
    I think you would have to give more details of the macro and any errors.
    Make something idiot proof and someone will make a better idiot...

  3. #3
    Join Date
    Oct 2003
    Posts
    1,091
    As for why - the object model changed slightly from 2000 to 2002. As robojam indicated, more details about the macro will help resolve the difficulty.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

  4. #4
    Join Date
    Feb 2004
    Posts
    21

    Details

    Hi

    I use the macro(which was written in Excel 2002) and ran this macro in Excel 2000.My macro is about searching some values and replacing these values using the replace command. When I run the macro, an error msg appear saying Compile Error Named argument not found and the Search Format is highlighted. Is it the Excel 2000 has a different library to that of Excel 2002?
    Thanks

  5. #5
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Im Not entirely sure what you mean.
    If you are needing to replace text with a specific format in Excel 2000 then you can so it this way.

    in my example i used numberformat but adjust to your needs

    Code:
    If Application.Version = "9*" Then
        For Each Cell In Range("A1:D10")
            If Cell.NumberFormat = "0" Then
                Cell.Replace "*", "This Text"
            End If
        Next Cell
    End If
    To explain what's going on the application.version = "9*" looks for Excel 2000
    i then search each cell in a specific range and if the Number format is "0" then it will replace any text with "This Text"
    I had to do this with creating Charts from a pivot table in 97 to 2000 as the pivotchart was introduced, I don't Know anything of the new features of 2002 so im just guessing at a soloution

    Hope this helps in any way
    David

  6. #6
    Join Date
    Feb 2004
    Location
    Charlotte, NC
    Posts
    79
    Post the offending piece of VBA, as I have Excel 2000 here at work and I will see if I can find out where the problem lies. Try to give an example of the type of data in cells too.
    Make something idiot proof and someone will make a better idiot...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •