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: 2
Default Runtime Error '7': Out of Memory

I am trying to use vba in excel to open several excel files and format them
to what I need. When I run the procedure, I keep getting Runtime Error '7':
Out of Memory. I have tried running the procedure with nothing else open and
I do not understand how I could be out of memory. I am using Excel 2002. I
created a smaller procedure in a new excel file to test and still got the
error. Here is the code from my test procedu

Public Sub test()

Dim xlApp As Excel.Application
Dim wb As Excel.Workbook
Dim str As String

Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True

str = "C:\temp\test.xls"
Set wb = xlApp.Workbooks.Open(str, False, True, , , , , , , False)

xlApp.Quit
Set xlApp = Nothing

End Sub

The error occurs on the line "Set xlApp = CreateObject("Excel.Application")".
I have tried using the line "Set xlApp = New Excel.Application" and the
error still occurs.

Also, when I close out of excel and try to open a new excel file, I get a
dialog box telling me that excel did not open properly last time and suggests
that I open excel in safe mode.

Can anyone please help me? Thank you.
 
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
Runtime Error "7": Out of Memory Run Time Error 7 Excel Programming 0 November 10th 05 12:00 PM
Runtime Error 7, Out of Memory Fred Holmes Excel Programming 0 November 18th 04 07:07 PM
Excel:Runtime Error 7 "Not enough Memory" with CreateObject (SAP.B sebastienm Excel Programming 0 July 24th 04 08:35 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 06:24 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"