Referring to a frame with a frame

J

jayklmno

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?
 
C

Chip Pearson

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top