ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referring to a frame with a frame (https://www.excelbanter.com/excel-programming/419110-referring-frame-frame.html)

jayklmno

Referring to a frame with a frame
 
I have created a user form that has one large frame in it (MonthFrame)...
inside the frame are 35 other frames (DayFrame1-35)... in code I want to
change the name of the day frame... how do I refer to that frame with a frame?

Me.controls(nameofframe).caption dpesn;t work...

Any help?

Chip Pearson

Referring to a frame with a frame
 
You can refer directly to a nested frame.

Debug.Print UserForm1.DayFrame1.Caption

Or, you can go through the Controls method:

Debug.Print UserForm1.MonthFrame.Controls("DayFrame1").Caption


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Mon, 27 Oct 2008 13:52:08 -0700, jayklmno
wrote:

I have created a user form that has one large frame in it (MonthFrame)...
inside the frame are 35 other frames (DayFrame1-35)... in code I want to
change the name of the day frame... how do I refer to that frame with a frame?

Me.controls(nameofframe).caption dpesn;t work...

Any help?



All times are GMT +1. The time now is 06:11 PM.

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