难倒 - VB6 Com Obj无法访问MS Excel [英] Stumped - VB6 Com Obj can't access MS Excel

查看:56
本文介绍了难倒 - VB6 Com Obj无法访问MS Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这很可能属于另一个论坛,但我想我会从这里开始。我用
有一个用VB6编写的COM对象。 DLL将访问MS Excel并使用它的
对象库来编写自定义报告并将其保存到文件夹中。

DLL甚至会为每个步骤写入日志,以便我们可以解决

问题(如果有的话)。


这种方法适用于一台机器而不是另一台机器。 DLL正在尝试的文件夹要写入的
具有分配给的完全权限并且是大开的。此外,

log txt文件写在同一个文件夹中没有问题,所以我知道它不是文件夹权限问题。问题似乎是当

DLL试图访问MS Excel时。 DLL被简单地告知许可被拒绝。通过

Windows。


我会很感激任何指针!

This most likely belongs in another forum but I thought I''d start here. I
have a COM Object written in VB6. The DLL will access MS Excel and use it''s
Object Library to write a customized report and saves it to a folder. The
DLL even writes to a log for each step it takes so we can troubleshoot the
problems (if any).

This works fine on one machine but not another. The folder the DLL is trying
to write to has full permissions assigned to and is wide open. Furthermore,
the log txt file is being written in the same folder with no problems so I
know it''s not a folder permissions issue. The problem seems to be when the
DLL tries to access MS Excel. The DLL is simple told "permission denied" by
Windows.

I would appreciate any pointers!

推荐答案

权限被拒绝了什么? Excel工作簿?目录?你不知道?


这是一个袖手旁观的猜测:你是在创建Excel的多个实例

而不是在每个实例时退出使用该应用程序完成了吗?


只是一个猜测。


HTH,

-

Joe


VB.NET/C#/ASP.NET/ASP/VB/C++/Web和数据库开发/ VBA自动化

" D 。 Shane Fowlkes写道:
Permission denied to what? The Excel workbook? Directory? You don''t know?

This is an off-the-cuff guess: are you creating multiple instances of Excel
and not quitting each one when done using the application?

Just a guess.

HTH,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"D. Shane Fowlkes" wrote:
这很可能属于另一个论坛,但我想我会从这里开始。我有一个用VB6编写的COM对象。 DLL将访问MS Excel并使用它的对象库来编写自定义报告并将其保存到文件夹中。
DLL甚至会为每个步骤写入日志,以便我们可以解决问题(如果有的话)。

这在一台机器上工作正常,但在另一台机器上工作正常。 DLL正在尝试写入的文件夹具有分配给的完整权限,并且是完全开放的。此外,log txt文件正在写在同一个文件夹中,没有任何问题,所以我知道它不是文件夹权限问题。问题似乎是当
DLL尝试访问MS Excel时。 DLL被简单地告知许可被拒绝。通过
Windows。

我很感激任何指针!
This most likely belongs in another forum but I thought I''d start here. I
have a COM Object written in VB6. The DLL will access MS Excel and use it''s
Object Library to write a customized report and saves it to a folder. The
DLL even writes to a log for each step it takes so we can troubleshoot the
problems (if any).

This works fine on one machine but not another. The folder the DLL is trying
to write to has full permissions assigned to and is wide open. Furthermore,
the log txt file is being written in the same folder with no problems so I
know it''s not a folder permissions issue. The problem seems to be when the
DLL tries to access MS Excel. The DLL is simple told "permission denied" by
Windows.

I would appreciate any pointers!



我不认为所以。它在第一次尝试时失败了。


最好的是我可以描述的是DLL被拒绝了许可以获得
Excel本身。 Excel仅为此功能安装在机器上。

日志我们跟踪每一个动作和动作,似乎被拒绝

一旦尝试访问它就立即访问Excel。我99%肯定

这不是文件夹权限问题。


" Joe" <乔****** @ donotspam.yahoo.com>在消息中写道

新闻:DB ********************************** @ microsof t.com ...
I don''t think so. It failed on the first attempt.

The best was I can describe it is that the DLL is being denied permission to
Excel itself. Excel is installed on the machine just for this function. The
log we have tracks every single move and action and seems to be denied
access to Excel immediately as soon as it tries to access it. I''m 99% sure
this isn''t a folder permissions issue.


"Joe" <jo******@donotspam.yahoo.com> wrote in message
news:DB**********************************@microsof t.com...
权限被拒绝了什么? Excel工作簿?目录?你不知道吗?

这是一个袖手旁观的猜测:你是创建多个实例的
Excel
而不是在每个实例中退出使用该应用程序完成了吗?

只是一个猜测。

HTH,
-
Joe

VB.NET / C#/ ASP.NET / ASP / VB / C ++ / Web和DB开发/ VBA自动化

" D. Shane Fowlkes写道:
Permission denied to what? The Excel workbook? Directory? You don''t
know?

This is an off-the-cuff guess: are you creating multiple instances of
Excel
and not quitting each one when done using the application?

Just a guess.

HTH,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"D. Shane Fowlkes" wrote:
这很可能属于另一个论坛,但我想我会从这里开始。
我有一个用VB6编写的COM对象。 DLL将访问MS Excel并使用
它的对象库来编写自定义报告并将其保存到文件夹。
即使DLL写入日志也是如此它需要的每一步,以便我们可以解决
问题(如果有的话)。

这在一台机器上运行良好,但在另一台机器上运行不正常。 DLL正在尝试写入的文件夹具有分配给它的完全权限,并且是开放的。
此外,
log txt文件正在写在同一个文件夹中,没有问题所以
我知道它不是文件夹权限问题。问题似乎是当
DLL试图访问MS Excel时。这个DLL很简单,被Windows告知许可被拒绝。

我很感激任何指针!
This most likely belongs in another forum but I thought I''d start here.
I
have a COM Object written in VB6. The DLL will access MS Excel and use
it''s
Object Library to write a customized report and saves it to a folder.
The
DLL even writes to a log for each step it takes so we can troubleshoot
the
problems (if any).

This works fine on one machine but not another. The folder the DLL is
trying
to write to has full permissions assigned to and is wide open.
Furthermore,
the log txt file is being written in the same folder with no problems so
I
know it''s not a folder permissions issue. The problem seems to be when
the
DLL tries to access MS Excel. The DLL is simple told "permission denied"
by
Windows.

I would appreciate any pointers!


您知道DLL可以与其他应用程序一起使用吗?如果没有,你有源代码

代码吗?

-

Joe


VB。 NET / C#/ ASP.NET / ASP / VB / C ++ / Web和DB开发/ VBA自动化

" D. Shane Fowlkes写道:
Do you know that the DLL works with other apps? If not, do you have source
code?
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"D. Shane Fowlkes" wrote:
我不这么认为。它在第一次尝试时失败了。

最好的是我可以描述的是DLL被拒绝了Excel本身的许可。 Excel仅为此功能安装在机器上。
日志我们跟踪每一个动作和动作,似乎一旦尝试访问它就立即被拒绝访问Excel。我99%肯定
这不是文件夹权限问题。


" Joe" <乔****** @ donotspam.yahoo.com>在消息中写道
新闻:DB ********************************** @ microsof t.com。 ..
I don''t think so. It failed on the first attempt.

The best was I can describe it is that the DLL is being denied permission to
Excel itself. Excel is installed on the machine just for this function. The
log we have tracks every single move and action and seems to be denied
access to Excel immediately as soon as it tries to access it. I''m 99% sure
this isn''t a folder permissions issue.


"Joe" <jo******@donotspam.yahoo.com> wrote in message
news:DB**********************************@microsof t.com...
权限被拒绝了什么? Excel工作簿?目录?你不知道吗?

这是一个袖手旁观的猜测:你是创建多个实例的
Excel
而不是在每个实例中退出使用该应用程序完成了吗?

只是一个猜测。

HTH,
-
Joe

VB.NET / C#/ ASP.NET / ASP / VB / C ++ / Web和DB开发/ VBA自动化

" D. Shane Fowlkes写道:
Permission denied to what? The Excel workbook? Directory? You don''t
know?

This is an off-the-cuff guess: are you creating multiple instances of
Excel
and not quitting each one when done using the application?

Just a guess.

HTH,
--
Joe

VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"D. Shane Fowlkes" wrote:
这很可能属于另一个论坛,但我想我会从这里开始。
我有一个用VB6编写的COM对象。 DLL将访问MS Excel并使用
它的对象库来编写自定义报告并将其保存到文件夹。
即使DLL写入日志也是如此它需要的每一步,以便我们可以解决
问题(如果有的话)。

这在一台机器上运行良好,但在另一台机器上运行不正常。 DLL正在尝试写入的文件夹具有分配给它的完全权限,并且是开放的。
此外,
log txt文件正在写在同一个文件夹中,没有问题所以
我知道它不是文件夹权限问题。问题似乎是当
DLL试图访问MS Excel时。这个DLL很简单,被Windows告知许可被拒绝。

我很感激任何指针!
This most likely belongs in another forum but I thought I''d start here.
I
have a COM Object written in VB6. The DLL will access MS Excel and use
it''s
Object Library to write a customized report and saves it to a folder.
The
DLL even writes to a log for each step it takes so we can troubleshoot
the
problems (if any).

This works fine on one machine but not another. The folder the DLL is
trying
to write to has full permissions assigned to and is wide open.
Furthermore,
the log txt file is being written in the same folder with no problems so
I
know it''s not a folder permissions issue. The problem seems to be when
the
DLL tries to access MS Excel. The DLL is simple told "permission denied"
by
Windows.

I would appreciate any pointers!



这篇关于难倒 - VB6 Com Obj无法访问MS Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆