+ Reply to Thread
Results 1 to 6 of 6

VBA cleanup

  1. #1
    Registered User
    Join Date
    01-23-2010
    Location
    Brisbane
    MS-Off Ver
    Excel 2003
    Posts
    20

    VBA cleanup

    Hi
    I had a query in the Excel General area and have come up with an solution that works reasonably well with some basic VBA coding.
    Is this coding OKAY or can it be tidied up a bit ?

    I would like to think I was on the right path in coding this.

    Here is the original posting....




    http://www.excelforum.com/excel-gene...match-vba.html

  2. #2
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: VBA cleanup

    Let us assume for the sake of argument that you are referring to the code i post #8. Then no I can't clear it up because it is not the entire procedure.

    Post the whole thing here, from Sub to End sub, inclusive.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: VBA cleanup

    First, you don't need a colon at the end of every line!

    Second, avoid selecting things - it's unnecessary 99.86% of the time.

    Third, always specify the property you want - even .Value

    Untested:
    Please Login or Register  to view this content.
    I am not suggesting this is the most efficient way of achieving your ends, just amending the existing code.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    11-13-2006
    Posts
    87

    Re: VBA cleanup

    A picture may be worth a thousand words but a workbook is worth a thousand pictures!
    Can I steal that? I'll credit you.

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,973

    Re: VBA cleanup

    Feel free.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,117

    Re: VBA cleanup

    Maybe this:

    Please Login or Register  to view this content.

    Regards, TMS
    Attached Files Attached Files
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Cleanup
    By specialk9203 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2014, 09:50 AM
  2. [SOLVED] Code Cleanup Help
    By maddog9486 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-13-2011, 02:19 PM
  3. Code cleanup
    By timlocke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2011, 08:01 PM
  4. String Cleanup
    By TheAndarious in forum Excel General
    Replies: 1
    Last Post: 07-21-2010, 03:59 PM
  5. if (formula cleanup)
    By simpson in forum Excel General
    Replies: 8
    Last Post: 05-19-2010, 08:08 PM

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