ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function to return the current Worksheet name? (https://www.excelbanter.com/excel-worksheet-functions/32926-function-return-current-worksheet-name.html)

Steve

Function to return the current Worksheet name?
 
Is there a function that returns the current Worksheet name? I am creating
multiple Worksheets by Copying and Pasting the same "template" sheet and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve



Anne Troy

Try this, Steve:
http://www.officearticles.com/excel/...ft_e xcel.htm

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am creating
multiple Worksheets by Copying and Pasting the same "template" sheet and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve





Barb Reinhardt

I've seen some VB code that does this, but can't seem to find it right now.
Try doing a Google search for it.

"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am creating
multiple Worksheets by Copying and Pasting the same "template" sheet and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve





Steve

Hi Anne, thanks for the fast response. Your solution took me 30 seconds to
implement & 30 minutes to understand! :)

Steve

"Anne Troy" wrote in message
news:cf71d$42c1daf3$97c5108d$31392@allthenewsgroup s.com...
Try this, Steve:
http://www.officearticles.com/excel/...ft_e xcel.htm

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com


"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am
creating
multiple Worksheets by Copying and Pasting the same "template" sheet and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve







Steve

Thanks Barb, I had tried doing from within a VB macro but couldn't figure
out how to call the macro by invoking a function. I know I can invoke the
macro from a form but I don't want to start putting buttons or other form
elements on the worksheet.

Steve

"Barb Reinhardt" wrote in message
...
I've seen some VB code that does this, but can't seem to find it right
now. Try doing a Google search for it.

"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am
creating multiple Worksheets by Copying and Pasting the same "template"
sheet and would like as much of the worksheet specific text as possible
to be generated automatically.

Thanks, Steve







Bob Phillips

Maybe something like this

Function ThisSheet() As String
ThisSheet = Application.Caller.Parent.Name
End Function

called from a worksheet with =ThisSheet()

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Barb Reinhardt" wrote in message
...
I've seen some VB code that does this, but can't seem to find it right

now.
Try doing a Google search for it.

"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am

creating
multiple Worksheets by Copying and Pasting the same "template" sheet and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve







Steve

Thanks Bob, amazing how much easier things become when exact syntax is
available.

Steve

"Bob Phillips" wrote in message
...
Maybe something like this

Function ThisSheet() As String
ThisSheet = Application.Caller.Parent.Name
End Function

called from a worksheet with =ThisSheet()

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Barb Reinhardt" wrote in message
...
I've seen some VB code that does this, but can't seem to find it right

now.
Try doing a Google search for it.

"Steve" wrote in message
...
Is there a function that returns the current Worksheet name? I am

creating
multiple Worksheets by Copying and Pasting the same "template" sheet
and
would like as much of the worksheet specific text as possible to be
generated automatically.

Thanks, Steve










All times are GMT +1. The time now is 05:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com