| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
Using VB to rename Excel sheet tabs
|
Original Message
|
Name: Shawn
Date: March 28, 2003 at 12:08:59 Pacific
Subject: Using VB to rename Excel sheet tabsOS: 2000CPU/Ram: pent 4 |
Comment: In Excel i want to rename the worksheet tab using a VB macro. I want it to copy a cell on the worksheet and use it as the worksheet name. It needs to be variable because i want to copy the worksheet, increment the cell value by one, and have the new worksheet named the new cell value. Here is the code: ActiveSheet.Copy After:=ActiveSheet ActiveSheet.Previous.Select Range("j3").Copy ActiveSheet.Next.Select Range("j3").PasteSpecial xlPasteValues Range("j3").Value = Range("j3").Value + 1 ActiveSheet.Name = Range("j3").Value It is the last line that is giving me trouble. Thanks for any help.
Report Offensive Message For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home