Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Release files from memory??

Hello,
Upon closing two files after running a macro that is copying value
from one file to the other I can only reopen them in read only, unles
I reboot. Apparently the files are still in memory. How do I correc
this problem?

Thanks.
Ro

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Release files from memory??

Your explanation doesn't seem right. How does the macro close the files? Is
it possible that it is just hiding them? Relevant code excerpts would be
helpful.

--

Vasant


"Ron " wrote in message
...
Hello,
Upon closing two files after running a macro that is copying values
from one file to the other I can only reopen them in read only, unless
I reboot. Apparently the files are still in memory. How do I correct
this problem?

Thanks.
Ron


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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Release files from memory??

Ron wrote in message ...
Hello,
Upon closing two files after running a macro that is copying values
from one file to the other I can only reopen them in read only, unless
I reboot. Apparently the files are still in memory. How do I correct
this problem?

Thanks.
Ron


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


Hi Ron, sounds like you are creating another instance of Excel
via the automation method of creatobject or getobject via the New key word.
Either way you need to follow the basics of any COMS enabled
application ie.

1) Establish interface via calls
... do your code
2) close and/or save file/data
3) quit application
4) destroy instance via setting of your obj var that holds the
reference to it = Nothing.

Appologies if this is not the case :-)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Release files from memory??

Hi
Below is the code I am using. I open both files, the one I am copyin
to and the one I am coping from. After I run the macro and close bot
files I can only open either file in read only unless I reboot. I a
sure the code has much room for improvement, for I am new at this. An
help will be greatly appreciated.
Ron

Application.ScreenUpdating = False

Dim rRCount As Integer
Dim cRCount As Integer
Dim rSCount As Integer
Dim cSCount As Integer
Dim LoopNo As Integer

rRCount = 15
cRCount = 5
rSCount = 7
cSCount = 4

pass = False

For x = 1 To 19

If pass = True Then
rRCount = 63
cRCount = 5
rSCount = 11
cSCount = 4
pass = False
End If

If x = 3 Then
cRCount = cRCount - 8
rSCount = rSCount - 4
End If

If x = 17 Then
rRCount = rRCount - 1
End If

If x = 18 Then
rRCount = rRCount - 1
End If

LoopNo = 4

If x = 19 Then
LoopNo = 3
End If

For A = 1 To LoopNo

Windows("Appendix C FFP Off-site Att 3.xls").Activate
Sheets("Base year").Select
Cells(rRCount, cRCount).Select
Selection.Copy
Windows("FFP Rates Off-Site TE B.xls").Activate
Sheets("FFP Base Yr").Select
Cells(rSCount, cSCount).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False

rRCount = rRCount + 0
cRCount = cRCount + 2
rSCount = rSCount + 1
cSCount = cSCount + 0
Next A

If x < 2 Then
pass = True
Else
pass = False
End If

rRCount = rRCount + 48
cRCount = cRCount + 0
rSCount = rSCount + 4
cSCount = cSCount + 0

Next x

End Su

--
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
XL 2007 - Out of Memory - memory leak/bug? PCLIVE Excel Discussion (Misc queries) 0 March 23rd 09 03:31 PM
Cursor Release KLA Excel Discussion (Misc queries) 6 March 6th 07 12:48 PM
Is this release buggy? Matt Morgan Excel Discussion (Misc queries) 1 December 19th 06 03:44 PM
Release Memory Jeff Excel Discussion (Misc queries) 1 September 25th 06 09:28 PM
Suggestions for the Next Release ExcelPro Excel Discussion (Misc queries) 0 May 24th 06 07:45 AM


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