![]() |
Worksheet.GetCodeName/Get_CodeName
Hello
Both these methoeds return empty strings to my C++ Add-in code. Whereas VBA returns the expected codes sheet1, sheet2 etc.. Any idea how to get these Worksheet codes with automation? Regds Gap. |
Worksheet.GetCodeName/Get_CodeName
Gap,
Try something along these lines, with a reference set to MS VBA Extensibility: Sub ShowCodeName() MsgBox ActiveWorkbook.VBProject.VBComponents(ActiveSheet. Name) _ .Properties("_CodeName").Value End Sub HTH, Bernie MS Excel MVP "Gap" wrote in message oups.com... Hello Both these methoeds return empty strings to my C++ Add-in code. Whereas VBA returns the expected codes sheet1, sheet2 etc.. Any idea how to get these Worksheet codes with automation? Regds Gap. |
Worksheet.GetCodeName/Get_CodeName
"Bernie Deitrick" <deitbe @ consumer dot org wrote in message ... Gap, Try something along these lines, with a reference set to MS VBA Extensibility: Works quite nicely without the reference Bernie. |
All times are GMT +1. The time now is 02:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com