+ Reply to Thread
Results 1 to 6 of 6

Shortening code (multiple selects & deletes)

  1. #1
    Forum Contributor
    Join Date
    11-02-2011
    Location
    Rugby, England
    MS-Off Ver
    Office 365
    Posts
    869

    Shortening code (multiple selects & deletes)

    Afternoon happy campers,

    Please Login or Register  to view this content.
    Could you please tell me how to make this shorter (hopefully more efficient) as i was previously told that the mroe times i 'Select' something the longer it can take to complete the code?

    Kind Regards, galvinpaddy

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Shortening code (multiple selects & deletes)

    I reckon that's just
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Shortening code (multiple selects & deletes)

    On a dummy file, i inserted 3 buttons using the Developer menu (Developer - Insert - choose command button).

    The name that appeared for me on the buttons was "Button 1".

    So i edited your code to delete those buttons and have this as the final code
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Shortening code (multiple selects & deletes)

    why use shaperanges at all if you're gonna delete them one by one? ;-)

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Shortening code (multiple selects & deletes)

    Yeah. I hardly use arrays, always get stuck with them

    Thanks anyways JP, it was learning for me too.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Shortening code (multiple selects & deletes)

    what I mean is your code could just be
    Please Login or Register  to view this content.

+ 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