472,145 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Help with Excel VBA

Hi,

I am running an Excel Application that uses a Control Button to invoke a
java application that performs some computation and writes the results to a
text file. The VB code behind the Button calls the VB procedure Shell() to
invoke the java application. The problem is, when the java application is
run from Excel/VBA the file doesn't get written. This is not the case
when the java application is invoked from either JBuilder or a Command
Prompt Window. Does Excel/VBA block the writing of files while running, or
is this a memory thing? Any insights would be welcome? The irritating
thing is that java doesn't throw any exceptions, the file just doesn't get
written.

Regards,

\ jon
Aug 22 '05 #1
2 7925
DJP
Are you specifying the full path to the text file within your Java code? If
not, you might find that the text file is actually being written, but to the
Excel default save folder (eg. <your profile>\My Documents).

"Jon Spragg" <jo********@btconnect.com> wrote in message
news:de**********@nwrdmz02.dmz.ncs.ea.ibs-infra.bt.com...
Hi,

I am running an Excel Application that uses a Control Button to invoke a
java application that performs some computation and writes the results to
a
text file. The VB code behind the Button calls the VB procedure Shell()
to
invoke the java application. The problem is, when the java application is
run from Excel/VBA the file doesn't get written. This is not the case
when the java application is invoked from either JBuilder or a Command
Prompt Window. Does Excel/VBA block the writing of files while running,
or
is this a memory thing? Any insights would be welcome? The irritating
thing is that java doesn't throw any exceptions, the file just doesn't get
written.

Regards,

\ jon

Aug 25 '05 #2
pellem
3
Are you sure Shell has finished executing before checking for the file?

Also, in Excel you can check 'Tools'->'Macro'->'Security'.
This may affect it if if set to high.
Sep 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marc | last post: by
9 posts views Thread by netpurpose | last post: by
2 posts views Thread by Business Information Systems, Inc. | last post: by
reply views Thread by fjlaga | last post: by
1 post views Thread by Coleen | last post: by
9 posts views Thread by pic078 via AccessMonster.com | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.