ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return sheet name from an address range (https://www.excelbanter.com/excel-programming/387420-return-sheet-name-address-range.html)

avi

Return sheet name from an address range
 
Hello,

I'm looking for a VBA function that returns the sheet name from a full
address of an excel range.

I am looking at a different solution than ...Range(name).Worksheet as
it seems not recognized in VB6

Please help
Avi


Norman Jones

Return sheet name from an address range
 
Hi Avi,

Try:

Dim sStr As String

sStr = Range("MyRange").Parent.Name


---
Regards,
Norman


"avi" wrote in message
oups.com...
Hello,

I'm looking for a VBA function that returns the sheet name from a full
address of an excel range.

I am looking at a different solution than ...Range(name).Worksheet as
it seems not recognized in VB6

Please help
Avi




merjet

Return sheet name from an address range
 
Range(name).Worksheet.Name should work.

Hth,
Merjet




All times are GMT +1. The time now is 05:37 PM.

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