473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

CMD to verify data has been written completely?? small script

This is my first coding attempt at VBA (6.3) and I'm very ill-rehearsed. I was hoping that someone with more experience would be able to help me out here. This is what I have:

Expand|Select|Wrap|Line Numbers
  1. Sub Macro1()
  2.     On Error GoTo ErrorHandler
  3.  
  4.     Const NEVER_TIME_OUT = 0
  5.     Dim x
  6.     x=InputBox("How many times should this loop?")
  7.  
  8.     With Session
  9.  
  10.        Do
  11.     .TransmitTerminalKey rcAnsiF2Key
  12.         .Wait (0.15)
  13.        .TransmitTerminalKey rcAnsiF3Key
  14.         .Wait (0.15)
  15.  
  16.     x = x-1
  17.     Loop while x>0    
  18.     Exit Sub
  19.  
  20. ErrorHandler:
  21.     .MsgBox Err.Description, vbExclamation + vbOKOnly
  22.     End With
  23.  
  24. End Sub
Instead of the horribly inefficient .Wait (.15) I was hoping that someone might be able to describe a better way to ensure that the data has been written. There are occasions that the program itself (on my network of 200+ users) can experiece some latency which will render the (.15) useless. I am unable to find the happy medium because if the (.15) is not long enough even a single time then the macro itself becomes useless. Making it (.1 or .2) would possibly work but in extreme lag spikes.... you get where I'm going.

Thanks!!!!!
Feb 19 '08 #1
2 1032
Killer42
8,435 Expert 8TB
What is this VBA embedded in?
Feb 20 '08 #2
I use it for a program called WRQ Reflections for Unix.
Feb 20 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed....
2
by: rc | last post by:
Hi I have a SQL2000 server with 128m rows of data. I want to delete about 65m of that. So far I have bcp'ed the relevent data out and put them into another SQL database. We have a small...
9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
23
by: Han | last post by:
Our app runs on end-users machines (apache2.x + php5). At this moment it is quite easy for someone (who has access to the console) to insert a couple lines of php code to steal sensitive info. ...
33
by: Daniel Fadlun | last post by:
Is there a bigger, mathematical, data type in C than the double (64 bit) one or the old long double (80 bit)? I'd like to add precision to my mathematical application, but I can't figure out how....
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
17
by: Timothy.Rybak | last post by:
Hello all, This is my first attempt at an application, so kid gloves are appreciated. I need to make a very simple form that only has a few elements. One is TraceCode - a text field that is...
7
by: jwhitby3 | last post by:
Hi all, I am trying to develop what amounts to a data entry page for the company I work for, (mostly to make my job easier). I think that I am beginning to grasp php, but I am at a loss now. I...
18
by: Jens | last post by:
I'm starting a project in data mining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.