ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referring to an ActiveX control (https://www.excelbanter.com/excel-programming/428596-referring-activex-control.html)

Brett

Referring to an ActiveX control
 
How do I set the focus to a control in worksheet please?
F_REF.Shapes("APP1_reset").SetFocus
doesn't work - it bugs out with "...doesn't support..." (F_REF has been set
as the sheet name and APP1_reset is the control name. Brett

Jacob Skaria

Referring to an ActiveX control
 
Dear Brett

Refer the shapes with its index or its name

Activesheet.shapes("Rectangle 1").Select

OR

Activesheet.shapes(1).Select


--
If this post helps click Yes
---------------
Jacob Skaria


"Brett" wrote:

How do I set the focus to a control in worksheet please?
F_REF.Shapes("APP1_reset").SetFocus
doesn't work - it bugs out with "...doesn't support..." (F_REF has been set
as the sheet name and APP1_reset is the control name. Brett


Brett

Referring to an ActiveX control
 
Thankyou Jacob. I was close but no smell of cigar smoke. Brett

"Jacob Skaria" wrote:

Dear Brett

Refer the shapes with its index or its name

Activesheet.shapes("Rectangle 1").Select

OR

Activesheet.shapes(1).Select


--
If this post helps click Yes
---------------
Jacob Skaria


"Brett" wrote:

How do I set the focus to a control in worksheet please?
F_REF.Shapes("APP1_reset").SetFocus
doesn't work - it bugs out with "...doesn't support..." (F_REF has been set
as the sheet name and APP1_reset is the control name. Brett


joel

Referring to an ActiveX control
 
OLE obejct can be reference by OLEOBJECTs("Listbox1").object

OLEOBJECT are both shapes and OLEOBJECTs. The object get you to the
properties that you normally see for a list box without the object it is the
shape properties.

"Brett" wrote:

How do I set the focus to a control in worksheet please?
F_REF.Shapes("APP1_reset").SetFocus
doesn't work - it bugs out with "...doesn't support..." (F_REF has been set
as the sheet name and APP1_reset is the control name. Brett


Brett

Referring to an ActiveX control
 
I see, thanks Joel. Btrett

"joel" wrote:

OLE obejct can be reference by OLEOBJECTs("Listbox1").object

OLEOBJECT are both shapes and OLEOBJECTs. The object get you to the
properties that you normally see for a list box without the object it is the
shape properties.

"Brett" wrote:

How do I set the focus to a control in worksheet please?
F_REF.Shapes("APP1_reset").SetFocus
doesn't work - it bugs out with "...doesn't support..." (F_REF has been set
as the sheet name and APP1_reset is the control name. Brett



All times are GMT +1. The time now is 07:06 AM.

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