Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help in running this script lower than Excel 2000
I have the ff script which ran ok in Excel 2000, but does
not work at a lower version, particularly the part where it searched for the filename. Can someone please help me, convert it or totally revise the script? Thanks rnum = 1 With Application.FileSearch .NewSearch .LookIn = "Z:\GT05\WBG\" & Left(code, 3) & "\" .SearchSubFolders = True .FileType = msoFileTypeExcelWorkbooks .Filename = "*-DeptConsol.xls" If .Execute() 0 Then For i = 1 To .FoundFiles.Count Set mybook = Workbooks.Open(.FoundFiles (i)) Set sourceRange = mybook.Worksheets (1).Range("A1:P170") SourceRcount = sourceRange.Rows.Count Set destrange = basebook.Worksheets (1).Cells(rnum, 1) basebook.Worksheets(1).Cells (rnum, "Q").Value = mybook.Name With sourceRange Set destrange = basebook.Worksheets (1).Cells(rnum, "A"). _ Resize (.Rows.Count, .Columns.Count) End With destrange.Value = sourceRange.Value |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
question about some excel restriction script running on ... | Excel Discussion (Misc queries) | |||
question about some excel restriction script running on ... | Excel Discussion (Misc queries) | |||
Excel 2000/XP script to Excel97 script | Excel Programming | |||
command line script for printing MS Excel 2000 document. | Excel Programming | |||
Running a VB Script | Excel Programming |