+ Reply to Thread
Results 1 to 2 of 2

Naming multiple worksheets using cell in that sheet

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010 for Mac
    Posts
    60

    Naming multiple worksheets using cell in that sheet

    Right now I am using the following VBA Code:

    Sub tabname()

    Dim ws As Worksheet



    For Each ws In Worksheets

    ws.Activate

    ws.Name = Range("$D$5").Value

    Next

    End Sub

    But I keep getting 1004 application-oriented or object-oriented error. Please help

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Naming multiple worksheets using cell in that sheet

    Hi, brandnew22,

    1004 is the "best" documented error. Maybe doubled up name, illegal characters used...

    Maybe use
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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. Creating and naming multiple worksheets; copying contents to new worksheets
    By HeadfortheHills in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2012, 08:49 AM
  2. [SOLVED] Adding and Naming Multiple Worksheets
    By Byron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 09:05 PM
  3. Adding and Naming Multiple Worksheets
    By Byron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  4. [SOLVED] Adding and Naming Multiple Worksheets
    By Byron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. Adding and Naming Multiple Worksheets
    By Byron in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM

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