Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
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
Using Multiple Options to Define Outputs LHP Excel Discussion (Misc queries) 1 October 30th 08 01:38 PM
Calculating Multiple Outputs of a Single Cell lsmull Excel Discussion (Misc queries) 1 October 3rd 06 05:39 PM
multiple inputs, multipul outputs (part 2) rjmckay Excel Discussion (Misc queries) 3 June 11th 06 07:30 AM
Using solver with function with multiple outputs [email protected] Excel Worksheet Functions 5 July 29th 05 01:58 PM
multiple outputs Daniell Excel Programming 1 October 15th 04 08:13 AM


All times are GMT +1. The time now is 02:35 PM.

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

About Us

"It's about Microsoft Excel"