Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Not able to run my application twice!


Hello!
I have some troubles with excel VBA,could someone please help??
My problem goes like this:
The user enters some data on a spreadsheet; after clicking on a comman
button, the data are passed to an .inp file (ECDISP.INP) and a dll i
called (the .inp file is dll's input). The dll's output is an .ou
file, which is passed to a second sheet in the same workbook as th
result of the whole process.
Now, I want the user to be able to go to the first sheet again, mak
the changes he wants to the input and get the new results in the secon
sheet, after clicking on the same button.
But I get an error message saying:
"Run-time error '1004':
Cannot access read-only document 'ECDISP.INP'."
So I have to close the .xls file and re-open it every time I want t
change the data!!!!Can I somehow avoid it??
Any ideas?
Thanks a lot in advance!

--
nicky0
-----------------------------------------------------------------------
nicky05's Profile: http://www.excelforum.com/member.php...fo&userid=2666
View this thread: http://www.excelforum.com/showthread.php?threadid=39940

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Not able to run my application twice!

If you open the inp file, do you close it after writing to it?

Does the .dll file also close it when done?

It sounds like one of your applications has kept it open for exclusive
access.

--
Regards,
Tom Ogilvy

"nicky05" wrote in
message ...

Hello!
I have some troubles with excel VBA,could someone please help??
My problem goes like this:
The user enters some data on a spreadsheet; after clicking on a command
button, the data are passed to an .inp file (ECDISP.INP) and a dll is
called (the .inp file is dll's input). The dll's output is an .out
file, which is passed to a second sheet in the same workbook as the
result of the whole process.
Now, I want the user to be able to go to the first sheet again, make
the changes he wants to the input and get the new results in the second
sheet, after clicking on the same button.
But I get an error message saying:
"Run-time error '1004':
Cannot access read-only document 'ECDISP.INP'."
So I have to close the .xls file and re-open it every time I want to
change the data!!!!Can I somehow avoid it??
Any ideas?
Thanks a lot in advance!!


--
nicky05
------------------------------------------------------------------------
nicky05's Profile:

http://www.excelforum.com/member.php...o&userid=26664
View this thread: http://www.excelforum.com/showthread...hreadid=399400



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Not able to run my application twice!


You are right!
I made several tests and finally the problem seems to be the dll .
Thanks for your reply!! :)


--
nicky05
------------------------------------------------------------------------
nicky05's Profile: http://www.excelforum.com/member.php...o&userid=26664
View this thread: http://www.excelforum.com/showthread...hreadid=399400

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
Application Michael Excel Programming 1 August 22nd 05 09:06 AM
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) Paul Martin Excel Programming 5 August 5th 05 04:44 PM
Replace application.RTD property by Application.RTDServers collect John.Greenan Excel Programming 1 July 7th 05 02:05 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM
application.quit will not shut off application john Excel Programming 0 January 9th 04 11:29 PM


All times are GMT +1. The time now is 05:00 PM.

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"