Latency on the move - without tripping down the stairs!

A

AltaEgo

Hi

I need to check wireless LAN latency while roaming. I am currently using
code to grab user location via InputBox as below but would prefer to keep
the ping running independently. Is there a way I can keep ping results
flowing with the user updating location only when a new location is reached?
In other words, can the following be changed or altered so the user does not
have to keep pressing [Enter] for the next ping?

While UCase(sCurLocation) <> "Z"

Cells(i, 1) = Now()
tmp = IPPing(sHost)
'.
Cells(i, 2) = tmp
sCurLocation = InputBox(".","Location?", Cells(i, 3).Offset(-1))
If StrPtr(sCurLocation) = 0 Then Exit Sub
Cells(i, 3) = UCase(sCurLocation)
Cells(i, 4).FormulaR1C1 = '.

Wend
 
R

Rich Locus

Hello:

This is not an exact answer to your question, but you should be looking at
an Excel Timer function or Add-In. In Microsoft Access, when you create a
form, one of the properties is the Timer event. When you set the timer to an
interval, such as 10 seconds or 5 minutes, the code associated with the Timer
event will kick off each time the time interval is reached. I use it for
scraping emails from an Outlook inbox every 10 minutes.

I did a quick search and there are timer hints available out there. You
probably will create an Auto_Open subroutine to start your timer function.
If you aren't familiar with Auto_Open, it executes automatically
automatically when the workbook is opened.

Public Sub Auto_Open()
Code To Kick off Your Timer goes here.
End Sub
 
A

AltaEgo

I'm not sure what you mean. My experience indicates that running something
on a timer makes it fire at a set interval (say 10 seconds). What I need is
ping running without pause but the user to have the ability to update
location when it changes whether this is in 2 seconds; 3 minutes; 10 minutes
....

Phrased another way, is it possible to separate inputBox and Ping code yet
run them concurrently and combine the results?

--
Steve

Rich Locus said:
Hello:

This is not an exact answer to your question, but you should be looking at
an Excel Timer function or Add-In. In Microsoft Access, when you create a
form, one of the properties is the Timer event. When you set the timer to
an
interval, such as 10 seconds or 5 minutes, the code associated with the
Timer
event will kick off each time the time interval is reached. I use it for
scraping emails from an Outlook inbox every 10 minutes.

I did a quick search and there are timer hints available out there. You
probably will create an Auto_Open subroutine to start your timer function.
If you aren't familiar with Auto_Open, it executes automatically
automatically when the workbook is opened.

Public Sub Auto_Open()
Code To Kick off Your Timer goes here.
End Sub

--
Rich Locus
Logicwurks, LLC


AltaEgo said:
Hi

I need to check wireless LAN latency while roaming. I am currently using
code to grab user location via InputBox as below but would prefer to keep
the ping running independently. Is there a way I can keep ping results
flowing with the user updating location only when a new location is
reached?
In other words, can the following be changed or altered so the user does
not
have to keep pressing [Enter] for the next ping?

While UCase(sCurLocation) <> "Z"

Cells(i, 1) = Now()
tmp = IPPing(sHost)
'.
Cells(i, 2) = tmp
sCurLocation = InputBox(".","Location?", Cells(i, 3).Offset(-1))
If StrPtr(sCurLocation) = 0 Then Exit Sub
Cells(i, 3) = UCase(sCurLocation)
Cells(i, 4).FormulaR1C1 = '.

Wend
 
R

Rich Locus

Steve:

Since you are the expert in your application, would it be possible to have
the Ping function (with no input box) on a timer.. all it would do is ping
every X seconds and feed the worksheet. In an entirely different function
(not on a timer) , have the user input box functionality?

Again, you are the expert in what you are trying to accomplish.

Rich Locus
Logicwurks, LLC


AltaEgo said:
I'm not sure what you mean. My experience indicates that running something
on a timer makes it fire at a set interval (say 10 seconds). What I need is
ping running without pause but the user to have the ability to update
location when it changes whether this is in 2 seconds; 3 minutes; 10 minutes
....

Phrased another way, is it possible to separate inputBox and Ping code yet
run them concurrently and combine the results?

--
Steve

Rich Locus said:
Hello:

This is not an exact answer to your question, but you should be looking at
an Excel Timer function or Add-In. In Microsoft Access, when you create a
form, one of the properties is the Timer event. When you set the timer to
an
interval, such as 10 seconds or 5 minutes, the code associated with the
Timer
event will kick off each time the time interval is reached. I use it for
scraping emails from an Outlook inbox every 10 minutes.

I did a quick search and there are timer hints available out there. You
probably will create an Auto_Open subroutine to start your timer function.
If you aren't familiar with Auto_Open, it executes automatically
automatically when the workbook is opened.

Public Sub Auto_Open()
Code To Kick off Your Timer goes here.
End Sub

--
Rich Locus
Logicwurks, LLC


AltaEgo said:
Hi

I need to check wireless LAN latency while roaming. I am currently using
code to grab user location via InputBox as below but would prefer to keep
the ping running independently. Is there a way I can keep ping results
flowing with the user updating location only when a new location is
reached?
In other words, can the following be changed or altered so the user does
not
have to keep pressing [Enter] for the next ping?

While UCase(sCurLocation) <> "Z"

Cells(i, 1) = Now()
tmp = IPPing(sHost)
'.
Cells(i, 2) = tmp
sCurLocation = InputBox(".","Location?", Cells(i, 3).Offset(-1))
If StrPtr(sCurLocation) = 0 Then Exit Sub
Cells(i, 3) = UCase(sCurLocation)
Cells(i, 4).FormulaR1C1 = '.

Wend
.
 
A

AltaEgo

It's nice to hear someone thinks I am expert at something. Expert at being
not quite sure what I want does sound close to my Job Description at present
<g>

I really want Ping to loop and run at its own pace while the user updates
location only as it happens. Why? If there is a momentary lapse in
connection, there is a better chance it will be detected by a ping. I am
currently thinking DoEvents is the only answer. That seems to rule out
InputBox in favor of a cell or form. So much for simple ... but I guess it
never would be with VBA running and returning a ping.

--
Steve

Rich Locus said:
Steve:

Since you are the expert in your application, would it be possible to have
the Ping function (with no input box) on a timer.. all it would do is ping
every X seconds and feed the worksheet. In an entirely different function
(not on a timer) , have the user input box functionality?

Again, you are the expert in what you are trying to accomplish.

Rich Locus
Logicwurks, LLC


AltaEgo said:
I'm not sure what you mean. My experience indicates that running
something
on a timer makes it fire at a set interval (say 10 seconds). What I need
is
ping running without pause but the user to have the ability to update
location when it changes whether this is in 2 seconds; 3 minutes; 10
minutes
....

Phrased another way, is it possible to separate inputBox and Ping code
yet
run them concurrently and combine the results?

--
Steve

Rich Locus said:
Hello:

This is not an exact answer to your question, but you should be looking
at
an Excel Timer function or Add-In. In Microsoft Access, when you
create a
form, one of the properties is the Timer event. When you set the timer
to
an
interval, such as 10 seconds or 5 minutes, the code associated with the
Timer
event will kick off each time the time interval is reached. I use it
for
scraping emails from an Outlook inbox every 10 minutes.

I did a quick search and there are timer hints available out there.
You
probably will create an Auto_Open subroutine to start your timer
function.
If you aren't familiar with Auto_Open, it executes automatically
automatically when the workbook is opened.

Public Sub Auto_Open()
Code To Kick off Your Timer goes here.
End Sub

--
Rich Locus
Logicwurks, LLC


:

Hi

I need to check wireless LAN latency while roaming. I am currently
using
code to grab user location via InputBox as below but would prefer to
keep
the ping running independently. Is there a way I can keep ping results
flowing with the user updating location only when a new location is
reached?
In other words, can the following be changed or altered so the user
does
not
have to keep pressing [Enter] for the next ping?

While UCase(sCurLocation) <> "Z"

Cells(i, 1) = Now()
tmp = IPPing(sHost)
'.
Cells(i, 2) = tmp
sCurLocation = InputBox(".","Location?", Cells(i,
3).Offset(-1))
If StrPtr(sCurLocation) = 0 Then Exit Sub
Cells(i, 3) = UCase(sCurLocation)
Cells(i, 4).FormulaR1C1 = '.

Wend
.
 

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

Top