ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveControl (https://www.excelbanter.com/excel-programming/357028-activecontrol.html)

Geoff

ActiveControl
 
On a form I have a multipage with a number of pages and controls.

I cannot get ActiveControl.Name to return the control with focus as this
only returns "MultiPage1". MultiPage1.Page1.ActiveControl.Name has no effect.

What should the correct syntax be to address controls on Page1 of MultiPage1 ?

Geoff

Chip Pearson

ActiveControl
 
Try

MsgBox Me.MultiPage1.SelectedItem.ActiveControl.Name


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Geoff" wrote in message
...
On a form I have a multipage with a number of pages and
controls.

I cannot get ActiveControl.Name to return the control with
focus as this
only returns "MultiPage1". MultiPage1.Page1.ActiveControl.Name
has no effect.

What should the correct syntax be to address controls on Page1
of MultiPage1 ?

Geoff




Geoff

ActiveControl
 
Thanks for that.

Geoff

"Chip Pearson" wrote:

Try

MsgBox Me.MultiPage1.SelectedItem.ActiveControl.Name


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Geoff" wrote in message
...
On a form I have a multipage with a number of pages and
controls.

I cannot get ActiveControl.Name to return the control with
focus as this
only returns "MultiPage1". MultiPage1.Page1.ActiveControl.Name
has no effect.

What should the correct syntax be to address controls on Page1
of MultiPage1 ?

Geoff






All times are GMT +1. The time now is 12:21 AM.

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