+ Reply to Thread
Results 1 to 5 of 5

Optimisation of code

  1. #1
    Registered User
    Join Date
    11-22-2009
    Location
    Newcastle,England
    MS-Off Ver
    Excel 2003
    Posts
    78

    Optimisation of code

    Please Login or Register  to view this content.
    I have this as part of a bigger macro. Is there a quicker method to setting the titles to the first row of columns other than having the macro select each cell then add the text as shown?
    Last edited by munkee; 12-18-2009 at 04:02 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Optimisation of code

    Please Login or Register  to view this content.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Optimisation of code

    Try this:
    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Optimisation of code

    You can store the values in an Array if you find it easier to adapt in that manner, eg:

    Please Login or Register  to view this content.
    In VBA you rarely need to .Select anything - doing so will slow your code.

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

    Re: Optimisation of code

    Another way
    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