View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default sheet tab = to cell content

One way:

this will run only one time after the workbook is opened (and after the
request to update). Put it in your ThisWorkbook code module:

Private Sub Workbook_Open()
Dim ws As Worksheet
On Error Resume Next
For Each ws In ThisWorkbook.Worksheets
ws.Name = ws.Cells(8, "C").Text
Next ws
End Sub


In article .com,
"reaa" wrote:

i have a workbook with 12 sheets on it (workbook A). this workbook is
VERY linked to another workbook (workbook B).

workbook A has an area on each sheet for a date (cell C8) of each of
the 12 sheets. this date comes from workbook B. workbook B contains a
list of dates that increment weekly - i.e.
20-Feb-2007, 27-Feb-2007, 6-Mar-2007, etc.

these dates in workbook B will change (via. linkages to other cells in
workbook B).

i am trying to name the sheets/tabs in workbook A to these dates that
are in cell C8. I found a number of posts that allow you to do this,
however, the problem is that most of them relate to changing/focusing
on the cell (having to click in the cell & then it the tab value would
change).

I would like to know if this is possible to do as the file is open...
after you click on yes to that box that comes up when you have linked
workbooks. because the main issue is that someone may never click in
that date cell (C8) but the date could be changed in workbook B

if this is confusing, let me know.