文件关闭后xlNoSelection不会保持不变 [英] xlNoSelection not persisting after the file is closed

查看:106
本文介绍了文件关闭后xlNoSelection不会保持不变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在创建一个报告生成程序,其中VB 6.0作为前端,Oracle 10i作为后端。我的要求是

1.用户将通过前端查询数据库。

2.结果将填入MSHFlexGrid。

3.底部字幕将有一个按钮Export to excel。点击哪个shoud会生成一个包含在网格中的数据的excel文件。

4.用户必须无法从生成的文件中复制数据。他应该能够在没有任何密码等的情况下看到它。


因此,为了解决上述问题,我制作了一个VB程序。我已经成功实现了前三个目标。对于第四个要求,我使用以下代码:

Hello all,

I am creating a report generation program with VB 6.0 as front-end and Oracle 10i as back-end. My reqiurements are
1. User will query the database through the front-end.
2. The results will get populated in an MSHFlexGrid.
3. There will be a button at the bottom captioning "Export to excel" clicking which shoud generate an excel file with the data contained in the grid.
4. User must not be able to copy the data from the generated file. He should be able to see it without any passwords etc. being asked.

So, to solve the above problems, I have made a VB program. I have successfully achieved the first three objectives. For the requirement number four, I am using the following code:

展开 | 选择 | Wrap | 行号

推荐答案

我不太了解它,但我有一个问题。当你提到关闭时设置保护后的文件 - 保存吗?
I don''t know much about it, but I have one question. When you refer to "closing" the file after setting the protection - are you saving it?





不确定,但编码序列应该是反向的订单(检查Excel帮助):

Hi,

Not sure of this , but the coding Sequence should be in reverse order (Check Excel Help):

展开 | 选择 | Wrap | 行号


我肯定会在关闭之前保存文件。


另外,我已经尝试了两种方式,即首先保护然后设置EnableSelection属性,反之亦然。实际上,无论你做什么都没关系,无论如何在关闭它之前保存文件。因此,工作簿上的每个操作都应该保存。


任何其他专家都可以告诉我的方式???
I am definitely saving the file before closing it.

Also, I have tried it both the ways, i.e., first protect then setting EnableSelection property and vice-versa. Actually it doesn''t matter what you do first beacuse I am anyway saving the file before closing it. So every operation on the workbook should get saved.

Any other expert can show me the way???


这篇关于文件关闭后xlNoSelection不会保持不变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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