Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2005, 07:07 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default Display Tab Name on Sheet

Does anyone know if there is a way to display the name of the tab within a cell in a spread sheet. Like you can put &[tab] in a header to display it?

Thanks in advance

Mike

Mike
EchoVue.com
__________________
Mike
EchoVue.com
 
Old January 14th, 2005, 02:49 AM
Authorized User
 
Join Date: Jan 2005
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes!

Goto the cell where u need this to happen
type the formula =Tabname()
This will at first cause an error
now press Alt+F11 to goto VBA editor
Insert a new module

type these three lines there!

Function tabname()
tabname = ActiveSheet.Name
End Function

goto the cell again

ReCalc [or F9)

that's it!

regards
Amjad Mahmood



 
Old January 14th, 2005, 10:45 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 564
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Works great!! Thanks

Mike
EchoVue.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Open Workbook,Copy Sheet,Move Sheet, Close/Save ptrussell2009 Excel VBA 0 June 13th, 2008 02:28 PM
access function in data sheet(another sheet) jani Excel VBA 1 May 21st, 2008 07:15 PM
Tab item display prob / hide TABS query socoolbrewster CSS Cascading Style Sheets 4 June 13th, 2006 12:59 PM
Sheet Tab Neal Excel VBA 0 May 24th, 2006 10:12 AM
display excel sheet in form Kaustav Pro VB 6 0 March 8th, 2006 02:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.