Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open a workbook listed in a different worksheet (hope this is clearer!)
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 -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do use listed pathname to link values from another workbook? | Excel Discussion (Misc queries) | |||
Can't see 2 open workbooks listed in the Window tab | Charts and Charting in Excel | |||
Copying A Worksheet From Each Open Workbook to an new Workbook | Excel Worksheet Functions | |||
open workbook on same worksheet | Excel Discussion (Misc queries) | |||
Is there away to open a worksheet outside of the workbook? | Excel Discussion (Misc queries) |