469,323 Members | 1,247 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,323 developers. It's quick & easy.

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 7850
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.