Help With loop??

sparkyhp

Board Regular
Joined
Mar 6, 2009
Messages
66
Please can someone help. I have a list of Account names down colunm A of my spreadsheet and what I want to do is look at cell A5 bring up that account detail and print which is fine because I have that working but then I want to go to cell A6 get the detail for that account and print so really I want it to go down each one repeating the same loop until it reaches a blank and stops. This number of cells in A will vary each time it is run so any help would be really really appreciated.

Code:
Public Sub Test()
'Created using Vision XL Macro Builder 10/03/2009 10:59 by Heidi Park.
'Generated using Vision XL Macro Builder version 6.2.1.
    On Error GoTo ErrorHandler
1:
    Application.ScreenUpdating = False
2:
    Application.Range("$A$5:$A$282").Clear
3:
    Application.Range("$A$5").Select
    oXLBMacro.DataFill "Allacc", LsXLBSetupFileTypeWorkbook
4:
    Application.Range("$C$20:$C$27").Delete
5:
    Application.Range("$C$20").Select
    oXLBMacro.DataFill "COMPNAME", LsXLBSetupFileTypeWorkbook
6:
    Application.Range("$C$21").Select
    oXLBMacro.DataFill "ADD", LsXLBSetupFileTypeWorkbook
7:
    Application.Range("$C$31:$K$62").Delete
8:
    Application.Range("$C$31").Select
    oXLBMacro.DataFill "Detail", LsXLBSetupFileTypeWorkbook
    'Ensure Application is ready to resume control
    Application.ScreenUpdating = True
    Application.Interactive = True
    Exit Sub
 
Last edited by a moderator:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top