We help IT Professionals succeed at work.
Get Started

VBA Help in a While Looping not giving consistent results.

Issa S.
Issa S. asked
on
127 Views
Last Modified: 2017-12-16
Hi All,

Q:   VBA Help in a While Looping not giving consistent results.

I have made a VBA Sub to loop in a file and update a field in all records according to a defined formula.
It is to pick up the First value from the first record and loop to the rest of the file.

THE PROBLEM is:
It picks up the First Value sometimes correctly and sometimes from (God Knows), especially on re-run!!!
I think, as I was reading some posts, that it is picking from somethings hanging in the memory!!
Attached is the source code for it.

Help Please
29-a.txt
Comment
Watch Question
Owner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010
Commented:
This problem has been solved!
Unlock 2 Answers and 11 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE