LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Inconsistent error




The following block of code works absolutly fine when in a workbook by
itself, however, when it is part of the module it is intened for it creates
an error on the execute line!

"runtime error 5"
"Invalid procedure call"

I don't know why this is happening and would like an explination or a
pointer to why this maybe happening

If I remove everything in the line beyond Ececute it works fine.

When the error is occuring hovering the mouse over msoSortBy....... gives a
value of Empty. This should not be the case as the code works fine in
another workbook!



With Application.FileSearch
.LookIn = "C:\shop\hist\data"
.SearchSubFolders = False
.FileName = "reple*.xls"
.Execute SortBy:=msoSortByFileName, SortOrder:=msoSortOrderAscending
temp = .FoundFiles(.FoundFiles.Count)
End With


 
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
Date inconsistent help please :) daisy Excel Worksheet Functions 3 May 28th 10 08:37 PM
VLOOKUP inconsistent ... help. Wayne Excel Discussion (Misc queries) 2 February 22nd 10 09:07 AM
"This cell is inconsistent with the column formula" error Nebulous Excel Worksheet Functions 4 September 11th 09 12:53 AM
inconsistent error message DJ in KC Excel Discussion (Misc queries) 3 February 12th 09 05:10 AM
3-d referencing inconsistent duncan79 Excel Discussion (Misc queries) 5 January 25th 06 05:39 PM


All times are GMT +1. The time now is 03:14 AM.

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

About Us

"It's about Microsoft Excel"