+ Reply to Thread
Results 1 to 4 of 4

office 2003 and office 2007

  1. #1
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229

    office 2003 and office 2007

    I recorded a code using office 2003 that deletes a row if the row starts with two letters are in the code. The code works fine on office 2003 but when I run the same code on office 2007 it won't work. Is there more efficient code that does the same thing and works on office 2007. The code is below.

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hi Walid66,

    Can you tell us at which line the code is failing? In just a quick glance, I see you're referencing a workbook name ("search_xls.xls"). When using 2007, is your file saved in the old format (.xls) or is the file saved in the new 2007 format, .xlsx (or .xlsm for macro-enabled workbooks)?

  3. #3
    Forum Contributor
    Join Date
    12-09-2006
    Posts
    229
    the file is saved in .xls format and when I run the macro it deletes everything even if the words does not starts with the letters. Should I save my macro in office 2007 format?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Quote Originally Posted by walid66
    the file is saved in .xls format and when I run the macro it deletes everything even if the words does not starts with the letters. Should I save my macro in office 2007 format?
    Your code works in Excel 2007. I can't see why you are saving as *.xls instead of a 2007 macro enabled workbook (*.xlsm).

    This code should do what you want more efficiently without selecting ranges.
    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

+ 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