Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default TAB NAME IN A WOORKBOOK REFER TO A CELL ON WORKSHEET

CAN THE WORKSHEET OR TAB NAME REFER TO A CELL OR ADDRESS ON THE WORKSHEET?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default TAB NAME IN A WOORKBOOK REFER TO A CELL ON WORKSHEET

See

http://www.mcgimpsey.com/excel/event...efromcell.html

In article ,

wrote:

CAN THE WORKSHEET OR TAB NAME REFER TO A CELL OR ADDRESS ON THE WORKSHEET?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default TAB NAME IN A WOORKBOOK REFER TO A CELL ON WORKSHEET

THANK YOU VERY MUCH WAS VERY HELPFUL AND WORKED GREAT.

"JE McGimpsey" wrote:

See

http://www.mcgimpsey.com/excel/event...efromcell.html

In article ,

wrote:

CAN THE WORKSHEET OR TAB NAME REFER TO A CELL OR ADDRESS ON THE WORKSHEET?


  #4   Report Post  
Posted to microsoft.public.excel.misc
Han Han is offline
external usenet poster
 
Posts: 4
Default TAB NAME IN A WOORKBOOK REFER TO A CELL ON WORKSHEET

Can someone modify this code to add a number after the sheet name if it a
duplicate?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const sNAMECELL As String = "A1"
Const sERROR As String = "Invalid worksheet name in cell "
Dim sSheetName As String

With Target
If Not Intersect(.Cells, Range(sNAMECELL)) Is Nothing Then
sSheetName = Range(sNAMECELL).Value
If Not sSheetName = "" Then
On Error Resume Next
Me.Name = sSheetName
On Error GoTo 0
If Not sSheetName = Me.Name Then _
MsgBox sERROR & sNAMECELL
End If
End If
End With
End Sub

And if I delete say a duplicate sheet (Sheet(1)) and copy another sheet and
can it change the duplicate sheet to Sheet(1) and so on?
Reply
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
How can I refer to a worksheet using text in a cell? Preston Excel Discussion (Misc queries) 3 October 13th 06 01:35 PM
refer to last cell in worksheet? svh646 Excel Worksheet Functions 2 July 25th 06 01:23 AM
woorkbook Exxalis Excel Worksheet Functions 1 August 19th 05 12:13 PM
variable to refer to "this worksheet"? confused Excel Worksheet Functions 1 June 16th 05 11:51 PM
Refer to Excel Worksheet by its name RichB Excel Worksheet Functions 2 February 5th 05 01:07 PM


All times are GMT +1. The time now is 06:58 AM.

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

About Us

"It's about Microsoft Excel"