![]() |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 07:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com