Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Capturing current Worksheet Name as a variable

I have a workbook with several sheets for different types of client. I need
to capture the client type from the sheet name but how to do this with VBA is
a mystery.

Any support gratefuly received.
Many Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Capturing current Worksheet Name as a variable

Public Sub ws_name()
Dim s As String
s = ActiveSheet.Name
MsgBox s
End Sub



On Apr 4, 3:03 pm, Jimbob wrote:
I have a workbook with several sheets for different types of client. I need
to capture the client type from the sheet name but how to do this with VBA is
a mystery.

Any support gratefuly received.
Many Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Capturing current Worksheet Name as a variable

Jason and Jim
You guys are amazing - and so quick

Thank you


"Jason Lepack" wrote:

Public Sub ws_name()
Dim s As String
s = ActiveSheet.Name
MsgBox s
End Sub



On Apr 4, 3:03 pm, Jimbob wrote:
I have a workbook with several sheets for different types of client. I need
to capture the client type from the sheet name but how to do this with VBA is
a mystery.

Any support gratefuly received.
Many Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Capturing current Worksheet Name as a variable

Try this...

sub test()
msgbox activesheet.name
end sub
--
HTH...

Jim Thomlinson


"Jimbob" wrote:

I have a workbook with several sheets for different types of client. I need
to capture the client type from the sheet name but how to do this with VBA is
a mystery.

Any support gratefuly received.
Many Thanks

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
capturing current range of cells lwm Excel Programming 2 January 28th 08 03:52 AM
Capturing current folder path DKS Excel Programming 2 August 14th 06 11:34 AM
Capturing Decimal Values in Variable - Losing decimals when summin Mark Excel Programming 1 September 14th 05 05:26 PM
Help : Macro for capturing current system time imr Excel Programming 3 July 2nd 04 02:58 AM
On Error, Capturing current module and actual line of code Paul Martin Excel Programming 4 June 13th 04 06:21 AM


All times are GMT +1. The time now is 01:51 AM.

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

About Us

"It's about Microsoft Excel"