Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Excel file open in memory?

Hi all,
I have a spreadsheet and a .csv file that do things via a button in a Lotus
Notes database. The .csv file extracts itself to the hard drive, and is then
imported into the Excel spreadsheet using a Workbook_Open macro. I think I
have a problem with a file or Excel staying open in memory, or will have
very shortly. I just started getting an error saying the .csv file could not
be found by the Workbook_Open macro. The file was not being extracted, but
extracting it under another name worked just fine. I've posted the code
below that exports the range and saves it as a .csv file. Code looks pretty
primitive next to the other examples I've seen here, but anyway.... I was
wondering if I need to do something else at the end of this? Any help would
be greatly appreciated; I'm in over my head as usual!
Sub Export()
Application.DisplayAlerts = False
Application.Goto Reference:="EXPORTRANGE"
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("E1").Select
Selection.NumberFormat = "mm/dd/yyyy"
ChDir "C:\Lotus\work\123"
Range("B:B,D:D,F:F,H:H,J:J,L:L,N:N,P:P,R:R,T:T,V:V ,X:X,Z:Z").Select
Range("B1").Activate
Selection.Delete Shift:=xlToLeft
ActiveWorkbook.SaveAs Filename:="C:\Lotus\work\123\bake.csv", _
FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close
Application.Quit
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Excel file open in memory?

Each file name in a Windows folder must be unique.

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"cottage6"
wrote in message
Hi all,
I have a spreadsheet and a .csv file that do things via a button in a Lotus
Notes database. The .csv file extracts itself to the hard drive, and is then
imported into the Excel spreadsheet using a Workbook_Open macro. I think I
have a problem with a file or Excel staying open in memory, or will have
very shortly. I just started getting an error saying the .csv file could not
be found by the Workbook_Open macro. The file was not being extracted, but
extracting it under another name worked just fine. I've posted the code
below that exports the range and saves it as a .csv file. Code looks pretty
primitive next to the other examples I've seen here, but anyway.... I was
wondering if I need to do something else at the end of this? Any help would
be greatly appreciated; I'm in over my head as usual!
Sub Export()
Application.DisplayAlerts = False
Application.Goto Reference:="EXPORTRANGE"
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("E1").Select
Selection.NumberFormat = "mm/dd/yyyy"
ChDir "C:\Lotus\work\123"
Range("B:B,D:D,F:F,H:H,J:J,L:L,N:N,P:P,R:R,T:T,V:V ,X:X,Z:Z").Select
Range("B1").Activate
Selection.Delete Shift:=xlToLeft
ActiveWorkbook.SaveAs Filename:="C:\Lotus\work\123\bake.csv", _
FileFormat:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close
Application.Quit
End Sub

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
2MB Excel 2007 file is using 1GB of memory? PeteeWJ Excel Discussion (Misc queries) 4 June 18th 09 02:56 PM
Saving Excel file locks up all memory resources, accesses externalfile? [email protected] Excel Discussion (Misc queries) 4 December 21st 07 11:01 PM
Excel Interop with in-memory document - no file system [email protected] Excel Programming 1 July 3rd 07 07:20 AM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Not enough memory error - Can't open file jch Excel Discussion (Misc queries) 2 March 10th 05 09:29 PM


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