+ Reply to Thread
Results 1 to 9 of 9

VBA Search Macro works in 2007 wont work when using 2003

  1. #1
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    VBA Search Macro works in 2007 wont work when using 2003

    I have the below code that works fine when I run it on my computer using 2007. When my associates try to run it using 2003 it doesnt work. I can't figure out what I need to change in order for it to work across the board.

    here is the code:
    Please Login or Register  to view this content.
    END OF CODE

    Essentially what it is doing is searching an excel file for a value and selecting a specific number of cells from the offset of finding that value. There are several variables that have to pull from the orignal sheet that is running the macro and I need those variable to be pull from the sheet so that I can have different values on different sheets. It works on 2007 as I said but I cant get it to work with 2003. No idea why.

    I am relatively new to VBA and have worked this out based on previous forum questions and utilizing the macro recorder on 2007.

    Thanks for your help.
    Last edited by kmkelley; 04-13-2011 at 05:50 PM.

  2. #2
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Search Macro works in 2007 wont work when using 2003

    Could this have to do with my data file being in Read Only or Compatability Mode for the other users?

    I need them to be able to utilize the macro when the data file is in read only. Is this possible?

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: VBA Search Macro works in 2007 wont work when using 2003

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Search Macro works in 2007 wont work when using 2003

    I've updated the code setup. Sorry for the confusion. Any ideas why this isn't working?

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Search Macro works in 2007 wont work when using 2003

    Something like this:
    Please Login or Register  to view this content.
    Note: we generally need more information than "doesn't work". In what way does it fail - error message, do nothing, do the wrong thing or something else?
    Remember what the dormouse said
    Feed your head

  6. #6
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Search Macro works in 2007 wont work when using 2003

    That works. Thank you

  7. #7
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Search Macro works in 2007 wont work when using 2003

    The new VBA code works when I am using it. However once I save it down and then reopen to run again I get a "subscript out of range" error. I have the New Open Funds.xls open so i don't know why I am getting the error. Ideas?

  8. #8
    Registered User
    Join Date
    03-31-2011
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: VBA Search Macro works in 2007 wont work when using 2003

    It errors out on this section of the code.

    Please Login or Register  to view this content.

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Search Macro works in 2007 wont work when using 2003

    If the workbook is open in the same instance of Excel, then you would only get that error if the workbook name is wrong or the sheet name is.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1