ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Input to Form during Code Execution (https://www.excelbanter.com/excel-programming/370160-input-form-during-code-execution.html)

BillCPA

Input to Form during Code Execution
 
While code is running, is there a way to have a form showing on the screen
that will allow input; that is, a check box that can be checked, or option
button that can be selected, or a command button that can be used to set a
parameter.

Specifically, as the code executes and updates fields on the form, I'd like
to be able to stop execution (using a command button), look at the data on
the form, then resume execution (w/o using the Esc key).

Is this possible?

--
Bill @ UAMS

raypayette[_46_]

Input to Form during Code Execution
 

Here is Microsoft's example dor DoEvents:
' Create a variable to hold number of Visual Basic forms loaded
' and visible.
Dim I, OpenForms
For I = 1 To 150000 ' Start loop.
If I Mod 1000 = 0 Then ' If loop has repeated 1000 times.
OpenForms = DoEvents ' Yield to operating system.
End If
Next I ' Increment loop counter

--
raypayett

-----------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...fo&userid=2956
View this thread: http://www.excelforum.com/showthread.php?threadid=57091


BillCPA

Input to Form during Code Execution
 
Thanks - I think that will work.
--
Bill @ UAMS


"raypayette" wrote:


Here is Microsoft's example dor DoEvents:
' Create a variable to hold number of Visual Basic forms loaded
' and visible.
Dim I, OpenForms
For I = 1 To 150000 ' Start loop.
If I Mod 1000 = 0 Then ' If loop has repeated 1000 times.
OpenForms = DoEvents ' Yield to operating system.
End If
Next I ' Increment loop counter.


--
raypayette


------------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
View this thread: http://www.excelforum.com/showthread...hreadid=570917




All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com