Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gary DK very kindly provided a solution for naming tabs from the contents of
a cell on a worksheet. A further problem has arisen: The contents of cell B7 on all 125 sheets provides the name for the sheet tab. Cell B7 gets its information from a separate master sheet. When I sort the master sheet (because new entries have been added at the bottom and need to be arranged according to a ref. code) I get an error message: Runtime error 1004 Cannot rename a sheet to the same name as another sheet, a referenced object library or a workbook referenced by Visual Basic. this is the code: Option Explicit Private shname As String Private Sub Worksheet_Calculate() If Range("B7").Value < shname Then shname = [b7].Value End If Me.Name = shname End Sub Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Runtime Error 1004... help? | Excel Discussion (Misc queries) | |||
Macro runtime 1004 error on opening worksheet | Excel Discussion (Misc queries) | |||
unable to protect cells in macro sheet b/c runtime error 1004 | Excel Worksheet Functions | |||
Macro runtime error 1004 with Autofilter | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) |