TutorMe homepage
Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Alex Z.
Mechanical engineer willing to help with any engineering topic.
Tutor Satisfaction Guarantee
Visual Basic Programming
TutorMe
Question:

How do I do a For loop in VBA?

Alex Z.
Answer:

A For loop is a powerful programming technique. It allows you to repeat a process multiple times with only a few lines of code. Below is an example of a For loop, For i = 1 To 6 Cells( i, 1 ) = i Next i A For loop will always start with the key word "For" followed by a veritable. In the example above "i" was the For loop variable. You then set the variable equal to a starting value, in this case 1, and an ending value, in this case 6. You can now use that variable anywhere within the For loop where you want iterate its value. In the example, I chose to iterate the cell row and the value being write to that cell. To loop the For loop you use the key work "Next" followed by your For loop variable. In the above example, the for loop will iterate the value of "i" from 1 to 6. In the first loop Cells( 1, 1 ) will equal 1. Then the code will loop because it says "Next i" and the value of "i" will become 2. The code in the second loop will then say Cells( 2, 1) = 2. This process will continue all the way until "i" becomes 6. At the end of that sixth loop the For loop will end and the rest of your code, if any, will continue.

Mechanical Engineering
TutorMe
Question:

What is the difference between weight and mass?

Alex Z.
Answer:

Mass is determined by the total amount of material an object is made up of, while weight is the force of gravity acting on that object. $$ weight=mass * gravity $$ Another way to think about this is, an object on the Earth and on the Moon will have the same mass, however that object will have less weight in the moon because gravity on the moon is less.

Algebra
TutorMe
Question:

what does product and quotient mean?

Alex Z.
Answer:

The product of two numbers is a mathematical way of saying multiplication. The product of 6 and 3 is 18, because $$6*3=18$$. Whenever you hear product just think multiplication. On the other hand The quotient of two numbers is a mathematical way of saying division. The quotient of 6 and 3 is 2, because $$6/3=2$$. Whenever you hear quotient just think divition.

Send a message explaining your
needs and Alex will reply soon.
Contact Alex
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.