ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   why,,,, dificult?? (https://www.excelbanter.com/excel-programming/406292-why-dificult.html)

x taol

why,,,, dificult??
 
Dim grp As GroupObject, btn As Button
Set grp = ActiveSheet.GroupObjects("Group 131")
Set btn = grp.ShapeRange.GroupItems(Application.Caller)
but not work,,,,,,
debug error num = 5

*** Sent via Developersdex http://www.developersdex.com ***

JLGWhiz

why,,,, dificult??
 
My guess is that it does not like what is returned by the Application.Caller
expression.

"x taol" wrote:

Dim grp As GroupObject, btn As Button
Set grp = ActiveSheet.GroupObjects("Group 131")
Set btn = grp.ShapeRange.GroupItems(Application.Caller)
but not work,,,,,,
debug error num = 5

*** Sent via Developersdex http://www.developersdex.com ***


x taol

why,,,, dificult??
 
no, you were wrong. the btn name is returned by application.caller.

Dim grp As GroupObject, btn As Button
Set grp = ActiveSheet.GroupObjects("Group 131")
Set btn = grp.ShapeRange.GroupItems(Application.Caller)
btn.caption="any_str"

but, 3 line is error... oh, no....
please help me.... guru xl....




*** Sent via Developersdex http://www.developersdex.com ***

JLGWhiz

why,,,, dificult??
 
Dim grp As GroupObject

Shouldn't this be Dim grp As GroupShape? I don't find GroupObject as a
valid declaration.

"x taol" wrote:

no, you were wrong. the btn name is returned by application.caller.

Dim grp As GroupObject, btn As Button
Set grp = ActiveSheet.GroupObjects("Group 131")
Set btn = grp.ShapeRange.GroupItems(Application.Caller)
btn.caption="any_str"

but, 3 line is error... oh, no....
please help me.... guru xl....




*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 12:35 PM.

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