+ Reply to Thread
Results 1 to 2 of 2

pause in module sub for inputting data

Hybrid View

  1. #1
    Registered User
    Join Date
    04-10-2007
    Posts
    34

    pause in module sub for inputting data

    Hi,

    Is it possible to insert a pause in a module for users to input data?

    My program will be something like:

    1 - Activate input sheet
    2 - Message box : "please input evidence" (once the user clicks ok the module normally continues running, whereas I would like it to wait)
    3 - program waits as user inputs evidence either in the activated sheet or through an application (Netica, Bayesian network) created by the program
    4 - once inputted the program reads the input and does it's stuff

    Is this possible? is it easy to do?

    since there could be a large amount of evidence to be entered I was thinking of either a timed pause (10 secs) and then a yes/no prompt as to whether all the evidence has been entered, if not the wait an extra 10 secs before prompting again and continuing like this until the user clicks yes or perhaps using just a simple ok button once all the evidence is entered, without the timed prompts...

    Thanks in advance for all your help,

    Mbrolass.

  2. #2
    Registered User
    Join Date
    07-19-2007
    Posts
    3
    There are several possible solutions to the problem.

    In my opinion the cleanest is to create a userform which will have the instructions and then a series of text boxes into which the evidence is entered and an OK button. When the user clicks on OK the program would copy the information to the appropriate cells on the sheet and do the calculations.

    Alternately you can just add a button to the spreadsheet and associate it with the macro to do the calculation. You would then have to change your message to "Enter evidence and click 'Process' button when complete"

    If you want to use a time delay you can use Application.OnTime
    PHP Code: 
     Application.OnTime EarliestTime:=Now TimeValue("00:00:10"), Procedure:="ProcessEvidence" 
    This will run the subroutine ProcessEvidence in 10 seconds (Time value uses hours:minutes:seconds) The subroutine can then check if the evidence is complete and process it if complete or call the same function again if not

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1