Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
M M is offline
external usenet poster
 
Posts: 18
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question about some excel restriction script running on ... roise_r Excel Discussion (Misc queries) 0 March 30th 06 11:53 AM
question about some excel restriction script running on ... roise_r Excel Discussion (Misc queries) 0 March 30th 06 11:44 AM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
command line script for printing MS Excel 2000 document. Mitso Excel Programming 1 September 8th 03 09:07 PM
Running a VB Script Sofia Katchi Excel Programming 2 July 17th 03 03:22 PM


All times are GMT +1. The time now is 04:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"