Loop which continues until the value in the cell is 0

  • Hi!

    I'm pretty new to VBA, and especially loops.
    In this particular project I'm using two different workbooks. The first is a macro-enabled workbook (wb1) and the second is a range of data to be put in the first workbook (wb2).

    I have solved the issue of getting the macro to run three different operations, which includes converting the data from wb2 to "useable" data in wb1, copying the data onto a different sheet in wb1 (invoice-template) and saving the data in the invoice sheet as a pdf-file.

    I also want to use a loop that makes a loop out of the following tasks:
    (Active cell is B2 in wb1)
    Task 1) Selects cell A2 in wb2, copies the content and pastes it into cell B3 in wb1.
    Task 2) Runs a macro called RunAll() (runs three different macros).

    Then repeats task 1 to 3 for all cells in column A in wb2 that has a value greater than 0.

    Final note: Values in column A in wb2 are all numbers, of course.

    If anyone has a good loop to this, I will be very grateful :)

  • Re: Loop which continues until the value in the cell is 0

    Didn't know your exact requirement but i think this should give you a way to acquire what you want

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!