VBA and Frames query

  Chas49 16:23 30 Apr 2010
Locked

Can someone confirm that you cannot place a frame within another frame. I have tried this and find that the code to work on the second frame is simplu not recognised. The second frame was to be invisible until the instruction frame2.visible = true but this has no effect and, apparently neither is an error reported.

  VoG II 18:19 30 Apr 2010

It is not something that I have tried.

Presumably you are using frames to group option buttons. You can also assign option buttons to groups. This allows buttons to act as if they were in a frame, without the frame. Only one button in a group can be active at a time. To assign buttons to a group, right click on each option button and select Properties. Then assign a unique name for each set of buttons in the group name property.

You could then try adding a frame around that group and another set of option buttons.

  Chas49 19:46 30 Apr 2010

Thanks VOG - will try the grouping method as I think I was correct in the case of nested frames.

  Chris the Ancient 10:34 01 May 2010

Not sure which version of VBA you are using - or in which application but... some ideas, based on one or two things I have done in the past.

In design mode, is frame2 on top?

Is the 'original' frame transparent? Are you using fill colours? I can visualise a bit of masking going on here.

How have you made frame2 active? You may need to do this before the .visible command might work.

Only ideas, but worth putting forward - in case.

CtA

  Chas49 10:44 01 May 2010

Chris the Ancient:

Thanks for your input and have noeted queries and suggestions. I'll have a look see, although at the moment, I'm trying another way to achieve my goal.
However, I will experiment - using your ideas as a guide.

As always, help is appreciated.

  Chas49 16:55 01 May 2010

I have tried a 'straight' Frame within a frame. By straight I mean no fill colours in them - only an Option Button in the second frame and a command button in the first. The second frame was not visible at the start and when the command button was clicked the single line of code (Frame2.visible = true) resulted in the frame being made visible. It would seem that one of your suggestions was correct Chris the Ancient.

Thanks to both for your replies.

  Chris the Ancient 17:18 01 May 2010

Glad I could help with one of my crackpot ideas.

CtA

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

Alice Saey's mesmerising animation for Dutch singer Mark Lotterman

iPad Pro 10.5in (2017) review

Comment booster votre iPhone ?