Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Limiting the use of a Macro Procedure.

Hi
I would like an example of the coding required to limit the use of a "macro
procedure" to a certain number of days.

The limited usage must also be effective if you reload the spreadsheet from
the harddrive and then try to run the Macro from this reloaded copy.

Thankyou
Ed

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Limiting the use of a Macro Procedure.

There's really no way to do this in XL. All someone would have to do is
open your workbook with the macros disabled to bypass your protection.

you can google these groups:

http://groups.google.com/advanced_gr...ugroup=*excel*

for ideas for how to make things more complicated for your users, but in
general, XL workbooks should be considered to be open to anyone who gets
hold of them.

In article ,
Ed wrote:

Hi
I would like an example of the coding required to limit the use of a "macro
procedure" to a certain number of days.

The limited usage must also be effective if you reload the spreadsheet from
the harddrive and then try to run the Macro from this reloaded copy.

Thankyou
Ed

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 279
Default Limiting the use of a Macro Procedure.

Hi
I don't really understand your reply so, I think my question was not stated
clear enough.
An example of what I am referring to is -
Once I installed a game that would be inoperable after 30 days.
After 30 days, I reinstalled the game and it was still inoperable.
So, the original operation of the game put information in some file in
the
computer to let the reinstalled game know that the 30 days of usage was
already used up.
In other words the game entered a message in a file (other than the game
file, such as the registry file or one of the ini files) that the 30 days
have past. Then the reinstalled game sees this message and stops the game
from working.
This is what I am trying to do in my Excel spreadsheet Macro procedure.
Thankyou,
Ed

"JE McGimpsey" wrote:

There's really no way to do this in XL. All someone would have to do is
open your workbook with the macros disabled to bypass your protection.

you can google these groups:

http://groups.google.com/advanced_gr...ugroup=*excel*

for ideas for how to make things more complicated for your users, but in
general, XL workbooks should be considered to be open to anyone who gets
hold of them.

In article ,
Ed wrote:

Hi
I would like an example of the coding required to limit the use of a "macro
procedure" to a certain number of days.

The limited usage must also be effective if you reload the spreadsheet from
the harddrive and then try to run the Macro from this reloaded copy.

Thankyou
Ed


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Limiting the use of a Macro Procedure.

So your macro now is going to read a value from the registry and decide
whether to continue or exit based on this value. What's to stop the user
from editing the macro and or registry? This is certainly doable but by no
means bullet proof.

Here's some examples but beware that if you plan to write to the local
machine hive then your users will probably need to be administrators.

http://msdn.microsoft.com/library/de...15c9ebcc77.asp
http://msdn.microsoft.com/library/de...15c9ebcc77.asp

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Ed" wrote:
| Hi
| I don't really understand your reply so, I think my question was not
stated
| clear enough.
| An example of what I am referring to is -
| Once I installed a game that would be inoperable after 30 days.
| After 30 days, I reinstalled the game and it was still inoperable.
| So, the original operation of the game put information in some file
in
| the
| computer to let the reinstalled game know that the 30 days of usage
was
| already used up.
| In other words the game entered a message in a file (other than the game
| file, such as the registry file or one of the ini files) that the 30 days
| have past. Then the reinstalled game sees this message and stops the game
| from working.
| This is what I am trying to do in my Excel spreadsheet Macro procedure.
| Thankyou,
| Ed


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default Limiting the use of a Macro Procedure.

Oops, one of the links should have been;

http://msdn.microsoft.com/library/en...e49ab3a015.asp

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Limiting the use of a Macro Procedure.

You can do that. The problem is that it's trivial for anyone with enough
savvy to find these newsgroups to bypass any Excel protection you
install, so your code that writes to the registry would be easily
modified/disabled.

If that's not a concern, I've got some examples of sequential numbering
that could be modified for your purpose he

http://www.mcgimpsey.com/excel/sequentialnums.html

The best way to do it would probably to compile your application into a
COM add-in that tweaked the registry or a hidden file.

In article ,
Ed wrote:

Hi
I don't really understand your reply so, I think my question was not stated
clear enough.
An example of what I am referring to is -
Once I installed a game that would be inoperable after 30 days.
After 30 days, I reinstalled the game and it was still inoperable.
So, the original operation of the game put information in some file in
the
computer to let the reinstalled game know that the 30 days of usage was
already used up.
In other words the game entered a message in a file (other than the game
file, such as the registry file or one of the ini files) that the 30 days
have past. Then the reinstalled game sees this message and stops the game
from working.
This is what I am trying to do in my Excel spreadsheet Macro procedure.
Thankyou,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limiting a macro to one column Steve Excel Discussion (Misc queries) 3 February 21st 05 11:12 PM
Use Procedure Instead of Macro WStoreyII Excel Programming 0 August 5th 04 02:45 AM
Calling a .Net Procedure from a Macro Scott Eguires Excel Programming 0 December 10th 03 10:35 PM
Rum macro in procedure SpeeD[_2_] Excel Programming 4 August 8th 03 12:21 AM


All times are GMT +1. The time now is 08:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"