Open a workbook listed in a different worksheet (hope this is clearer!)

N

nickyboy

Hi,

I will try to explain my problem.

I have one workbook (A) with 200 columns, each column headed with th
address of different workbook. The rows underneath containin
numerical data.

The data in each column is in 200 other seperate workbooks. I woul
like to check that the numbers in workbook A matches that in the 20
files.

I tried to make a macro copy and paste the address from each colum
into the bar at the top, opening the corresponding workbook so I ca
take a number from cell D28 back to the original workbook to check i
is the same.

I have attached the macro below.

' Macro recorded 03/09/2004 by nick

Range("B2").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWorkbook.FollowHyperlink Address:= _
"P:\\Data2\peer1-branch-1.xls" _
, NewWindow:=False, AddHistory:=True
ActiveWindow.ScrollRow = 25
ActiveWindow.SmallScroll Down:=-3
Range("D28").Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.WindowState = xlMinimized
Range("B4").Select
ActiveSheet.Paste
Columns("B:B").Select
Application.CutCopyMode = False
Selection.Cut
ActiveWindow.ScrollColumn = 242
Columns("IU:IU").Select
Selection.Insert Shift:=xlToRight
End Sub

As you can see, this obviously opens "P:\\Data2\peer1-branch-1.xls
everytime. Is there a way I can open whatever address is in cell B2?

I hope it is clearer this time, if not, please let me know.

Thanks,
Nic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top