Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get ActiveSheet name in VB
This must surely be one of the simplest VB questions??
I am trying to figure out how to extract the name (tab name) of the active sheet into VB, so I can then concatenate it into a longer string that specifies a query file. i.e. on ActiveSheet "FRED", I want to extract the string "FRED" and then build the string "FRED.IQY" As it happens, I have an add-in worksheet function Sheetname() that will produce this name for me. So I can have a cell (e.g. at C2 that already has the string "FRED" in it My problem is to extract this from either cell C2 or fron the name of the ActiveSheet into a string. There are 150 sheets in my workbook. I want the macros to be run on only the ActiveSheet It must be a very simple syntax and code. But what is it? Thanks Geoff Lambert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get ActiveSheet name in VB
sStr = ActiveSheet.Name & ".IQY"
-- Regards, Tom Ogilvy "Geoff Lambert" wrote in message u... This must surely be one of the simplest VB questions?? I am trying to figure out how to extract the name (tab name) of the active sheet into VB, so I can then concatenate it into a longer string that specifies a query file. i.e. on ActiveSheet "FRED", I want to extract the string "FRED" and then build the string "FRED.IQY" As it happens, I have an add-in worksheet function Sheetname() that will produce this name for me. So I can have a cell (e.g. at C2 that already has the string "FRED" in it My problem is to extract this from either cell C2 or fron the name of the ActiveSheet into a string. There are 150 sheets in my workbook. I want the macros to be run on only the ActiveSheet It must be a very simple syntax and code. But what is it? Thanks Geoff Lambert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
name of the activesheet | Excel Programming | |||
ActiveSheet.Name? | Excel Programming | |||
ActiveSheet | Excel Programming | |||
ActiveSheet | Excel Programming | |||
ActiveSheet | Excel Programming |