Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Go Back  Xtreme Visual Basic Talk > > > > Get the name of the Worksheet on each Worksheet tab


Reply
 
Thread Tools Display Modes
  #1  
Old 12-17-2016, 04:12 AM
mogilshik's Avatar
mogilshik mogilshik is offline
Junior Contributor
 
Join Date: Aug 2003
Location: Saint-Petersburg
Posts: 366
Default Get the name of the Worksheet on each Worksheet tab


Hello!
I am using this formula to get the name of the Worksheet:
=MID(CELL("filename"),FIND("]",CELL("filename"))+1,30)
This formula work file when it is use on only ONE Worksheet – when I use it on other tabs – I need to recalculate the workbook each time I make another tab ACTIVE. And the other tabs show the same result as the active tab.
I wonder if there is a way to get the Worksheet name correctly on all tabs?
I included the example!
D
Attached Files
File Type: zip archive(1).zip (6.4 KB, 1 views)
__________________
Look past them as though there's something there which is distracting you. When they turn around to see what it is, hit them on the head with an esky lid. Pretend it fell from a tree, even if there are no trees around
"...21 Fun Things To Do Or Say When Your Being Yelled At.."
Reply With Quote
  #2  
Old 12-17-2016, 08:27 PM
Kluz's Avatar
KluzGet the name of the Worksheet on each Worksheet tab Kluz is offline
Sapience.Aquire

Super Moderator
* Expert *
 
Join Date: Oct 2003
Location: Lake Bluff, Ill., U.S.
Posts: 3,445
Default

Each sheet has a Worksheet_Activate event, you can recalculate a specific workcell in that event procedure.
__________________
No the other right mouse click
Reply With Quote
  #3  
Old 12-19-2016, 07:02 AM
Goggy's Avatar
Goggy Goggy is offline
Contributor
 
Join Date: Sep 2005
Location: Enschede,The Netherlands
Posts: 670
Default

To offer an other solution.

i would use the Sheet activate event. This is located in the workbook.

Somthing like so.

Code:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    With Sh
        .Cells(1, 1) = Sh.Name
    End With
End Sub
this wil place the sheet name in the first cell of the sheet.
__________________
As finishing touch, god created the Dutch!

utterly useless, but always trying to help
Reply With Quote
  #4  
Old 02-10-2017, 01:09 PM
Daigon Ali Daigon Ali is offline
Regular
 
Join Date: Aug 2014
Location: London
Posts: 59
Default

Try this formula instead.
Code:
=RIGHT(CELL("filename",A1),LEN(CELL("filename",A1))-SEARCH("]",CELL("filename",A1)))
Reply With Quote
Reply

Tags
active, formula, tab, tabs, worksheet


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
 
Get the name of the Worksheet on each Worksheet tab
Get the name of the Worksheet on each Worksheet tab
 
-->