1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Naming worsheets using VBA

Discussion in 'Business Applications' started by chaosboy, Feb 11, 2007.

Thread Status:
Not open for further replies.
  1. chaosboy

    chaosboy Thread Starter

    May 26, 2004

    I'd like to name a worksheet within excel by either one of two methods (that spring to mind, any suggestions gladly welcomed). Having the vba code look to a cell within the worksheet and then referencing that or have vba calculate the appropriate date when the macro is run.

    Thanks in advance,

  2. bomb #21

    bomb #21

    Jul 1, 2005
    What have you tried so far?:

    ActiveSheet.Name = Format(Date, "dd-mm-yy")

    ? Or:



    Whatever you use, you'll want to precede with something like:

    On Error Resume Next

    to cater for the cell or the date containing characters that can't be used in a sheet name (e.g. /)
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/543285

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice