![]() |
Loop Through UserForm For Multiple Different Outputs
I have a UserForm that I want to repeat so I can get different user input. I
want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? |
Loop Through UserForm For Multiple Different Outputs
Maybe this sample from Debra Dalgleish's site will help:
http://contextures.com/xlUserForm01.html You may want to look at data|form (in xl2003 menus) to see if that's sufficient, too. gims289 wrote: I have a UserForm that I want to repeat so I can get different user input. I want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? -- Dave Peterson |
Loop Through UserForm For Multiple Different Outputs
That is pretty much what I have, however, my userform is the last of 4
different, connected userforms that are used to gather information. This part of the data collection may have different inputs, but I can't continue on until the different inputs are complete. As you can see w/ the code pasted below, when I click the Next button on the userform, the loop starts over and never completes. I need a way to continue the loop w/out hitting the same button that executes the loop. Public Sub btnNextRate_Click() NextNumberRow = Cells(1, 1) StructureLoopCount = 1 Do Until StructureLoopCount = HowManyStructures 'declared earlier Call RateStructure Unload RatesForm RatesForm.Show StructureLoopCount = StructureLoopCount + 1 NextNumberRow = NextNumberRow + 1 Cells(1, 1) = NextNumberRow Loop "Dave Peterson" wrote: Maybe this sample from Debra Dalgleish's site will help: http://contextures.com/xlUserForm01.html You may want to look at data|form (in xl2003 menus) to see if that's sufficient, too. gims289 wrote: I have a UserForm that I want to repeat so I can get different user input. I want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? -- Dave Peterson |
Loop Through UserForm For Multiple Different Outputs
I really don't understand what the question is, but maybe you could a loop
within the loop. Do until ... 'a bunch of code do 'more code loop loop gims289 wrote: That is pretty much what I have, however, my userform is the last of 4 different, connected userforms that are used to gather information. This part of the data collection may have different inputs, but I can't continue on until the different inputs are complete. As you can see w/ the code pasted below, when I click the Next button on the userform, the loop starts over and never completes. I need a way to continue the loop w/out hitting the same button that executes the loop. Public Sub btnNextRate_Click() NextNumberRow = Cells(1, 1) StructureLoopCount = 1 Do Until StructureLoopCount = HowManyStructures 'declared earlier Call RateStructure Unload RatesForm RatesForm.Show StructureLoopCount = StructureLoopCount + 1 NextNumberRow = NextNumberRow + 1 Cells(1, 1) = NextNumberRow Loop "Dave Peterson" wrote: Maybe this sample from Debra Dalgleish's site will help: http://contextures.com/xlUserForm01.html You may want to look at data|form (in xl2003 menus) to see if that's sufficient, too. gims289 wrote: I have a UserForm that I want to repeat so I can get different user input. I want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? -- Dave Peterson -- Dave Peterson |
Loop Through UserForm For Multiple Different Outputs
Sorry, I'm having a hard time explaining it to myself as well. I need a way
to pause the execution of the code, re-enter different data, then have the code continue on from there. I need this to happen in the same procedure. Using a command button to continue forces the code to begin in another procedure. The loop w/in a loop doesn't help because I still need a way to continue after re-entering the new data. "Dave Peterson" wrote: I really don't understand what the question is, but maybe you could a loop within the loop. Do until ... 'a bunch of code do 'more code loop loop gims289 wrote: That is pretty much what I have, however, my userform is the last of 4 different, connected userforms that are used to gather information. This part of the data collection may have different inputs, but I can't continue on until the different inputs are complete. As you can see w/ the code pasted below, when I click the Next button on the userform, the loop starts over and never completes. I need a way to continue the loop w/out hitting the same button that executes the loop. Public Sub btnNextRate_Click() NextNumberRow = Cells(1, 1) StructureLoopCount = 1 Do Until StructureLoopCount = HowManyStructures 'declared earlier Call RateStructure Unload RatesForm RatesForm.Show StructureLoopCount = StructureLoopCount + 1 NextNumberRow = NextNumberRow + 1 Cells(1, 1) = NextNumberRow Loop "Dave Peterson" wrote: Maybe this sample from Debra Dalgleish's site will help: http://contextures.com/xlUserForm01.html You may want to look at data|form (in xl2003 menus) to see if that's sufficient, too. gims289 wrote: I have a UserForm that I want to repeat so I can get different user input. I want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? -- Dave Peterson -- Dave Peterson |
Loop Through UserForm For Multiple Different Outputs
I know I could get values using an inputbox. I'm not sure why you can't
retrieve values from the userform. You could either just hide the form and refer to the values for the controls in that userform or use public variables and have the userform's code populate those public variables. Then use those public variables in the code that continues. But I'm just guessing. I'm not sure if this helps or not--but I'm betting money on the "not". gims289 wrote: Sorry, I'm having a hard time explaining it to myself as well. I need a way to pause the execution of the code, re-enter different data, then have the code continue on from there. I need this to happen in the same procedure. Using a command button to continue forces the code to begin in another procedure. The loop w/in a loop doesn't help because I still need a way to continue after re-entering the new data. "Dave Peterson" wrote: I really don't understand what the question is, but maybe you could a loop within the loop. Do until ... 'a bunch of code do 'more code loop loop gims289 wrote: That is pretty much what I have, however, my userform is the last of 4 different, connected userforms that are used to gather information. This part of the data collection may have different inputs, but I can't continue on until the different inputs are complete. As you can see w/ the code pasted below, when I click the Next button on the userform, the loop starts over and never completes. I need a way to continue the loop w/out hitting the same button that executes the loop. Public Sub btnNextRate_Click() NextNumberRow = Cells(1, 1) StructureLoopCount = 1 Do Until StructureLoopCount = HowManyStructures 'declared earlier Call RateStructure Unload RatesForm RatesForm.Show StructureLoopCount = StructureLoopCount + 1 NextNumberRow = NextNumberRow + 1 Cells(1, 1) = NextNumberRow Loop "Dave Peterson" wrote: Maybe this sample from Debra Dalgleish's site will help: http://contextures.com/xlUserForm01.html You may want to look at data|form (in xl2003 menus) to see if that's sufficient, too. gims289 wrote: I have a UserForm that I want to repeat so I can get different user input. I want the input from the UserForm to write into a spreadsheet, then re-open the UserForm to get different user input and display after the previous input. Does anyone know of a way to pause the code while the UserForm is being populated, then have the code continue from where it left off? -- Dave Peterson -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 11:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com