> OCX, I don't think so unless you need some sort of control. Probably an
> ActiveX dll which would still require VBA wrapper in a workbook (xls/xla) or
[quoted text clipped - 21 lines]
> >
> > Thanks in advance
"shrutzin" wrote in message
> what about protecting the *.xla files through RMS? Is that possible?
Not sure what you mean but can'imagine how that would help protect the code
> Like using c#:
> workbooks.open("filename.xla");
> ...
> Add.permission(read.. or watever..?
If I follow, you are wondering about opening as ReadOnly, which indeed you
can do. But that would only prevent the file being re-saved with same name
and while opened with your code
Could save with ReadOnlyRecommended:=True but that won't help at all.
IOW, there is no way to make your VBA code fully secure, plenty of password
crackers out there.
Regards,
Peter T
> > OCX, I don't think so unless you need some sort of control. Probably an
> > ActiveX dll which would still require VBA wrapper in a workbook (xls/xla) or
[quoted text clipped - 21 lines]
> > >
> > > Thanks in advance
shrutzin - 19 Nov 2007 10:16 GMT
Hi
Thanks for replying but that is not what i meant,
Like any normal workbook(.xls) can be protected using IRM (windows right
management) through code or manually also; so cant we protect an xla file
also ? so that whenever anyone opens it it will first check for user
credentials? In this way no-one will be able to see the code but can load the
xla (from tools->add-in) for the feature it wants to use.
This is much safer tahn using passwords.
I am sorry if i was not clear earlier.
> "shrutzin" wrote in message
> > what about protecting the *.xla files through RMS? Is that possible?
[quoted text clipped - 45 lines]
> > > >
> > > > Thanks in advance
Peter T - 19 Nov 2007 11:03 GMT
Typically VBProject (where the code is) password crackers do not even open
the file, at least not in Excel. Instead they open file as in a Hex editor,
search for certain markers, replace sections that follow that represent the
password with own known password, write the amended file back to disk
(either with new name or with same name having renamed original file as say
*.bak). When done advise you of the new password.
AFAIK, whatever rights/permissions are assigned to the file or its folder
will not prevent the above.
Regards,
Peter T
> Hi
> Thanks for replying but that is not what i meant,
[quoted text clipped - 56 lines]
> > > > >
> > > > > Thanks in advance
shrutzin - 19 Nov 2007 11:49 GMT
hi
> Typically VBProject (where the code is) password crackers do not even open
> the file, at least not in Excel. Instead they open file as in a Hex editor,
> search for certain markers, replace sections that follow that represent the
AFAIK even if one opens a right-protected file in hex editor ; he/she will
not be able to do the above as the file is encrypted, even the content :) so
it will still be protected ...the only thing i am not sure of is how to do
this by code :)
Thanks and regards
Shrutzin
> Typically VBProject (where the code is) password crackers do not even open
> the file, at least not in Excel. Instead they open file as in a Hex editor,
[quoted text clipped - 20 lines]
> > This is much safer tahn using passwords.
> > I am sorry if i was not clear earlier.
Peter T - 19 Nov 2007 12:14 GMT
> as the file is encrypted,
Really ?
Even if it is encrypted and/or readonly, once open in Excel user can do a
SaveAs, eg
With Workbooks("theAddin.xla")
.SaveAs "C:\temp\" & _
Replace(.Name, ".xla", "_01.xla")
End With
Regards,
Peter T
> hi
>
[quoted text clipped - 33 lines]
> > > This is much safer tahn using passwords.
> > > I am sorry if i was not clear earlier.