View Single Post
  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Frank -

Just out of curiosity, why the application.enableevents lines? Are any
events fired by a change in the sheet name?

FWIW, I've got a similar routine that also (minimally) traps invalid
sheet names at

Changing Sheet Name to match cell, automatically
http://www.mcgimpsey.com/excel/event...efromcell.html



In article ,
"Frank Kabel" wrote:

Hi
do you need this automatically?. If yes try the following code in your
worksheet module:
Private Sub Worksheet_Change(ByVal Target As Range)
if target.address="$A$1" then
if target.value<"" then
application.enableevents=false
me.name=target.value
application.enableevents=true
end if
end if
End Sub


--
Regards
Frank Kabel
Frankfurt, Germany

"sam wildig" <sam schrieb im
Newsbeitrag ...
I am wondering if its possible to name a sheets in excel, with data

held in a
cell in the same worksheet
thanks for the help
regards sam