+ Reply to Thread
Results 1 to 5 of 5

tidy up code produced by macro recorder

  1. #1
    Registered User
    Join Date
    07-23-2007
    Location
    Liverpool UK
    Posts
    6

    tidy up code produced by macro recorder

    Hi i was wondering if someone can help me tidy up and speed up some code i have recorded using the macro recorder VBE is not my strong point...I just know it could probably be better!

    Many thanks for the help

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475
    Hi there,
    I am not sure what you are trying to do with this code,
    which columns do you want hidden
    Here's a simpler way to hide columns

    Please Login or Register  to view this content.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    If you look at your code you can see that it selects ranges 7 does nothing so those lines can be deleted. Also, Auto_Open macros have been replaced with the Workbok_Open event. I think this does what you intended

    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

  4. #4
    Registered User
    Join Date
    07-23-2007
    Location
    Liverpool UK
    Posts
    6

    Thanks

    Roy,

    Thanks for the reply, i knew there were unwanted things in there i jsut didnt know which bits to take out but your solution worked for me.

    Many thanks!!


  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You can always check by remming (precede them with an apostrophe) out lines that you suspect as unnecessary

+ 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