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:
The above code does protect the sheet and does not allow the user to select any cells. After that I am closing the workbook and here comes the problem into picture.
Actually when I am reopening the file (not programatically , just by double clicking the file), the sheet still is protected but user can very easily select the cells and copy them to a new sheet, thereby defeating the purpose of security and requirement number four.
My doubt is that the EnableSelection property is not persisting when the file is closed and is set to its default value when the file is reopened.
Kindly throw some light on this.
Thanks in anticipation.
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:
Code:
wksReport.Protect "something_secret" wksReport.EnableSelection = xlNoSelection
Actually when I am reopening the file (not programatically , just by double clicking the file), the sheet still is protected but user can very easily select the cells and copy them to a new sheet, thereby defeating the purpose of security and requirement number four.
My doubt is that the EnableSelection property is not persisting when the file is closed and is set to its default value when the file is reopened.
Kindly throw some light on this.
Thanks in anticipation.
Comment