Results 1 to 3 of 3

Get Worksheet tabs to automatically named?

Threaded View

stir-crazy Get Worksheet tabs to... 09-18-2007, 08:17 PM
derekbrown Hi, Did you paste the code... 09-19-2007, 05:20 PM
stir-crazy After some modification, I... 09-20-2007, 11:51 AM
  1. #1
    Registered User
    Join Date
    06-08-2007
    Posts
    22

    Question Get Worksheet tabs to automatically named?

    For an invoicing spreadsheet, I want a macro assigned to a button that will print an invoice, update 2 sheets of data with what was invoiced and copy and rename these updated sheets with the invoice number.


    I think I have it all figured out EXCEPT how to get the naming of these sheets. I found some code online that goes like this:
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Target.Address = "$A$1" Then Sh.Name = Target
    End Sub

    (found here:http://www.mrexcel.com/td0123.html)

    I can't seem to get this code to work. In VB editor, I've pasted this in, but either get no results, "argument not optional" errors...basically not the result I want.

    How can I get this code to work? Also, anticipating this macro to be run several times, is there going to be a problem with previously generated worksheets getting renamed?

    Hope I made myself understood. And any good recomendations for a poor student looking to teach themselves more on VBA?

    Thank you!
    Last edited by VBA Noob; 09-20-2007 at 03:18 AM.

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