Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to have the user select multiple workbooks and then compare data on them
I get a subcript out of range error on the last line, Workbooks(fName(1)).Worksheets("Sheet1").Range("A1 :C1").Value = name(1 It seems workbooks name property has to be of the form "book1.xls" not a directory like returned by getopenfilename (C:\...\book1.xls How can I refer to the workbooks for comparison/formatting changes (ie highlighting differences) besides the index number (which will cause problems if the user has other books already open. Thanks in advance Matt Lawso Dim fName(5) As Varian Dim x As Intege Dim name(5) As Varian For x = 1 To fName(x) = Application.GetOpenFilename("Excel Workbooks (*.xls),*.xls" Nex For x = 1 To Set myBook = Workbooks.Open(Filename:=fName(x) Workbooks.Open Filename:=fName(x Nex Workbooks(fName(1)).Worksheets("Sheet1").Range("A1 :C1").Value = name(1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problems with shared workbooks | Excel Discussion (Misc queries) | |||
Problems opening excel workbooks | Excel Discussion (Misc queries) | |||
linking problems and worksheets and workbooks | Excel Discussion (Misc queries) | |||
Linking problems between two workbooks - Excel 2000 SP3 | Setting up and Configuration of Excel | |||
Problems when printing large workbooks | Excel Discussion (Misc queries) |