LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Frame as variable (newbie question)

Hello all,

I'm using Excel 2000. I have a form with 7 frames, each with 10 comboboxes.
I can loop through all the boxes on each frame if I hardcode it.

for each control in userform1.frame1.controls...

I'd like to be able to change frame1 to a variable so I only have to use one
sub as opposed to 7.

dim x as ???
?set x = combobox1.parent?
for each control in userform1.x.controls...

Basically, I've written a sub that, on the combobox change event, will alert
the user if the same value is in more than one combobox in the same frame. I
don't want to prevent duplication, just let the user know with a msgbox. The
sub is written & works fine, I just can't make it work for more than one
frame. My plan is to declare a public variable, and set it's value in the
change event proc.

If my idea isn't possible, how can I find out what frame the combobox that
changed is in?

Thanks in advance,
Rik
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable Frame Reference Branden Durst New Users to Excel 1 February 17th 10 09:16 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
How to attach legend frame to chart frame? holg3r Charts and Charting in Excel 2 July 7th 05 11:41 PM
VBA Question - How to print a frame within a template Dave Peterson[_3_] Excel Programming 0 July 8th 04 10:53 PM
VBA Question - How to print a frame within a template gitcypher[_27_] Excel Programming 0 July 8th 04 08:47 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"