M
Marco
WinXPpro, Office XP, Word VBA
I have written a small VBA Add-In that saves information
to a file. In order to prevent tampering, I have set the
file attribute to Read-Only.
Before I write, I use GetAttr to retrieve a Long, then
binary 'and not' it with vbReadOnly and then do a SetAttr
to remove just the read only flag.
On some PC's this does not work. After investigation I
found out that GetAttr is returning a value of 8225 (8192
+ 32 + 1) and SetAttr was trying to use 8224 (8192 + 32)
and terribly crashed the Add-In.
Nor the documentation nor the Internet cover a bitvalue of
8192 (2048 at most). I have no clue how to solve this.
Any help is absolutely welcome.
I have written a small VBA Add-In that saves information
to a file. In order to prevent tampering, I have set the
file attribute to Read-Only.
Before I write, I use GetAttr to retrieve a Long, then
binary 'and not' it with vbReadOnly and then do a SetAttr
to remove just the read only flag.
On some PC's this does not work. After investigation I
found out that GetAttr is returning a value of 8225 (8192
+ 32 + 1) and SetAttr was trying to use 8224 (8192 + 32)
and terribly crashed the Add-In.
Nor the documentation nor the Internet cover a bitvalue of
8192 (2048 at most). I have no clue how to solve this.
Any help is absolutely welcome.