Thread: Renaming sheets
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 98
Default Renaming sheets

Hi JB Should there be a DOT in front of Range ?

"john" wrote:

another way:

With Worksheets("Sheet1")
.Name = .Range("L1").Value
End With
--
JB


"Nigel" wrote:

In
Private Sub CommandButton1_Click()

I have written this code segment to rename "Sheet1" = to the cell value in
"L1" on the same sheet. The Private Sub is located in a different sheet, but
in the same workbook.

Worksheets("Sheet1").Activate
With Worksheets("Sheet1")
.Sheet.Name = Range("L1")
End With

It fails at the third line with "error 438" object does'nt support this
property or method.
Any ideas anyone
Nigel