ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vba code (https://www.excelbanter.com/excel-programming/322587-vba-code.html)

Paul

vba code
 
what is the code to have vba return the active sheet name
as a variable??

I tried:

dim xxx as string
xxx = worksheets.value

but no workie

Jim Thomlinson[_3_]

vba code
 
You are going to kick yourself...

xxx = activesheet.name

Everything is obvious when you see the answer. Nothing is obvious until
then...

HTH

"Paul" wrote:

what is the code to have vba return the active sheet name
as a variable??

I tried:

dim xxx as string
xxx = worksheets.value

but no workie


Chip Pearson

vba code
 
Paul,

Dim S As String
S = ActiveSheet.Name


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Paul" wrote in message
...
what is the code to have vba return the active sheet name
as a variable??

I tried:

dim xxx as string
xxx = worksheets.value

but no workie





All times are GMT +1. The time now is 01:57 PM.

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