Read next value?

  • Thread starter Thread starter Mark J
  • Start date Start date
M

Mark J

I have a spreadsheet with a column of numbers, ie

1
2
3
4
5

what i would like to do is have another cell read each value and display it
, then after a few seconds it would read the second value and display,
etc....any ideas?
 
Hi Mark,

You could use the OnTime method to achieve
the desired result.

In this connection, see Chip Pearson's extensive
explanation and examples at:

Scheduling Events With OnTime And Windows Timers
http://www.cpearson.com/excel/OnTime.aspx

However, whilst you do not indicate the reason
for this functionality, if you are seeking an auditing
tool, perhaps an audio alternative might satisfy your
needs; John Walkenbach has an audio read-back
application which may be downloaded at:

Sound-Proof for Excel
http://www.j-walk.com/ss/sp/index.htm
 
Put the following function at the top of your code module

Public Function TwoSecDly()
s = Timer + 2
Do While Timer < s
DoEvents
Loop
End Function

Then Use this code to display the numbers in the column.

Sub displyNums()
Dim c As Range
Set myRng = ActiveSheet.Range("A1:A10") '<<Change to suit
For Each c In myRng
If Not c Is Nothing Then
Range("B5") = c.Value ' Did not specify where to display
TwoSecDly
End If
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top