Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2002, WinXP
Up until now I have always used a UF in a structure of: UF.Show The UF OKClick macro calls a macro. That macro: Make selections Builds an array or does something with the selection. End macro The UF OKClick macro unloads the UF. Now I want to put the UF inside a loop with the following structu Start the loop. UF.Show (Have an OK button but no Private OKClick macro at all) Make selections. Build an array or do something with the selection. Unload the UF Exit Sub if conditions warrant Modify the ranges and properties of the UF components (like a ListBox) Loop I just don't want to write all this code if my basic structure is flawed. Is the basic structure flawed? Will the code move on even though there is no Private OKClick macro? Thank you for your help. Otto |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can see already that the code will not go on to the next line after the
UF.Show line without a Private OKClick macro telling it to do so. What should that macro say? Thanks for your help. Otto "Otto Moehrbach" wrote in message ... Excel 2002, WinXP Up until now I have always used a UF in a structure of: UF.Show The UF OKClick macro calls a macro. That macro: Make selections Builds an array or does something with the selection. End macro The UF OKClick macro unloads the UF. Now I want to put the UF inside a loop with the following structu Start the loop. UF.Show (Have an OK button but no Private OKClick macro at all) Make selections. Build an array or do something with the selection. Unload the UF Exit Sub if conditions warrant Modify the ranges and properties of the UF components (like a ListBox) Loop I just don't want to write all this code if my basic structure is flawed. Is the basic structure flawed? Will the code move on even though there is no Private OKClick macro? Thank you for your help. Otto |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Otto,
You should be able to put code in the UserForm_Activate event to run a routine while the form is showing.... Private Sub UserForm_Activate Repaint 'optional Call DoMyOtherStuff(Val(UserForm1.Tag)) End Sub Regards, Jim Cone San Francisco, USA "Otto Moehrbach" wrote in message ... I can see already that the code will not go on to the next line after the UF.Show line without a Private OKClick macro telling it to do so. What should that macro say? Thanks for your help. Otto "Otto Moehrbach" wrote in message ... Excel 2002, WinXP Up until now I have always used a UF in a structure of: UF.Show The UF OKClick macro calls a macro. That macro: Make selections Builds an array or does something with the selection. End macro The UF OKClick macro unloads the UF. Now I want to put the UF inside a loop with the following structu Start the loop. UF.Show (Have an OK button but no Private OKClick macro at all) Make selections. Build an array or do something with the selection. Unload the UF Exit Sub if conditions warrant Modify the ranges and properties of the UF components (like a ListBox) Loop I just don't want to write all this code if my basic structure is flawed. Is the basic structure flawed? Will the code move on even though there is no Private OKClick macro? Thank you for your help. Otto |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim
Thanks for your response. I don't think that will work in my case. The UF has a ListBox (MultiSelect). The user selects one or more items and the code does things with the selection(s). I think I have to revamp my thinking some. Thanks again. Otto "Jim Cone" wrote in message ... Otto, You should be able to put code in the UserForm_Activate event to run a routine while the form is showing.... Private Sub UserForm_Activate Repaint 'optional Call DoMyOtherStuff(Val(UserForm1.Tag)) End Sub Regards, Jim Cone San Francisco, USA "Otto Moehrbach" wrote in message ... I can see already that the code will not go on to the next line after the UF.Show line without a Private OKClick macro telling it to do so. What should that macro say? Thanks for your help. Otto "Otto Moehrbach" wrote in message ... Excel 2002, WinXP Up until now I have always used a UF in a structure of: UF.Show The UF OKClick macro calls a macro. That macro: Make selections Builds an array or does something with the selection. End macro The UF OKClick macro unloads the UF. Now I want to put the UF inside a loop with the following structu Start the loop. UF.Show (Have an OK button but no Private OKClick macro at all) Make selections. Build an array or do something with the selection. Unload the UF Exit Sub if conditions warrant Modify the ranges and properties of the UF components (like a ListBox) Loop I just don't want to write all this code if my basic structure is flawed. Is the basic structure flawed? Will the code move on even though there is no Private OKClick macro? Thank you for your help. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find loop doesn't loop | Excel Discussion (Misc queries) | |||
How do I create a For loop within a For loop? | Excel Programming | |||
For/Loop skipping one value in loop only | Excel Programming | |||
Worksheet_Change - loop within a loop | Excel Programming | |||
HELP!!!! Can't stop a loop (NOT an infinite loop) | Excel Programming |