Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
name of the activesheet rasta Excel Programming 1 October 3rd 03 09:49 PM
ActiveSheet.Name? Andrew Stedman Excel Programming 5 July 30th 03 01:17 PM
ActiveSheet Graham[_3_] Excel Programming 0 July 30th 03 09:08 AM
ActiveSheet Ron de Bruin Excel Programming 0 July 29th 03 04:59 PM
ActiveSheet Graham[_3_] Excel Programming 0 July 29th 03 04:47 PM


All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"