Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Naming tabs

Tried it and it works. Thank you so much!! I need to learn more about Visual
Basic, it would really make life easier. Thanks again.

"Gord Dibben" wrote:

To add Bernie's code to a sheet, right-click on the sheet tab and "View Code"

Copy/paste his code into the sheet module that appears.

As Bernie notes, you would do this for each sheet you want to automatically
name.

My code covers all sheets in the workbook from one module.

Right-click on the Excel Icon left of "File" on menubar and "View Code".

Copy/paste my code into that Thisworkbook module.

Will work on all sheets in the workbook, including new inserted sheets.

To get a good idea of where to place different types of code, see Ron de Bruin's
site.

http://www.rondebruin.nl/code.htm


Gord


On Tue, 27 Nov 2007 07:19:02 -0800, Mike wrote:

I have never done a VBA function. Do I just type this in the VBA module and
then it should work, or do I need to do something more?

"Gord Dibben" wrote:

Or place this code into Thisworkbook module and forget about adding to each
sheet.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With ActiveSheet
If Not .Range("A1") Is Nothing Then
.Name = Range("A1").Value
End If
End With
End Sub


Gord Dibben MS Excel MVP

On Mon, 26 Nov 2007 18:02:53 -0400, "Bernard Liengme"
wrote:

Try this sub which must be placed on the sheet's module.
You need one for every sheet you which to rename
best wishes

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Me.Name = Range("A1").Value
End If
End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Naming Spreadsheet Tabs Ellen G Excel Discussion (Misc queries) 3 September 18th 07 07:48 AM
Naming Worksheet tabs Scott@CW Excel Discussion (Misc queries) 11 August 2nd 07 08:36 AM
Naming Tabs ebro Excel Discussion (Misc queries) 3 July 13th 06 11:07 PM
naming tabs Jeff Excel Worksheet Functions 8 February 6th 06 04:41 AM
Naming Sheets Tabs Cgbilliar Excel Worksheet Functions 2 November 5th 04 05:21 PM


All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"