Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Error 1004 - Out of Memory

I forgot to say that I am using Excel 97 (SR-2) and Windows 2000.

Bharesh
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error 1004 - Out of Memory

Sorry!! My original post was....

With the macro below, I get an "Out of Memory" error. Why should thi
be and how do I fix this??

Sub BatchProcessor()
With Application.FileSearch
.NewSearch
.LookIn = "d:\activea\" '(insert proper file directory)
.SearchSubFolders = True
.FileName = "PT4*.mea"
.MatchTextExactly = True
.FileType = msoFileTypeAllFiles
If .Execute() 0 Then
' MsgBox "There were " & .FoundFiles.Count & "file(s) found."
For I = 1 To .FoundFiles.Count
Workbooks.Open FileName:=.FoundFiles(I)
With ActiveWorkbook
Columns("A:A").EntireColumn.AutoFit
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1")
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(16, 1))
Selection.AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=1, Criteria1:="Dist"
Range("B2:B65536").Select
Selection.NumberFormat = "0.0000"
Selection.NumberFormat = "0.000"
Selection.Copy
Range("D1").Select
ActiveSheet.Paste
Selection.AutoFilter Field:=1
Range("E1").Select

ActiveCell.FormulaR1C1 = "=AVERAGE(C[-1])"
Range("F1").Select
ActiveCell.FormulaR1C1 = "=COUNT(C[-2])"
Range("F2").Select

End With
Next I
Else
MsgBox "There were no files found"
End If
End With
End Sub


Regards,

Bharesh Mandali

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error 1004 - Out of Memory

Hello again,

I tried the macro on a machine with Excel97 (SR2) and Windows98, an
guess what??? I worked perfectly!!!! No errors at all. Is there a bu
using Excel97 and Windows2000???

Regards,

Bhares

--
Message posted from http://www.ExcelForum.com

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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
Runtime error '1004' General ODBC error star_lucas New Users to Excel 0 August 29th 05 04:09 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Error 1004 - Out of Memory m4nd4li4 Excel Programming 1 July 13th 04 03:28 PM
VBA error - run-time error '1004': Romanian37 Excel Programming 3 May 21st 04 03:25 PM


All times are GMT +1. The time now is 06:49 PM.

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"