PDA

View Full Version : Trial period for spreadsheet



mike0123m
03-09-2012, 09:35 AM
I'm trying to create a trial version of a program so that after 7 days the spreadsheet cannot no longer be opened. I found the attached file in the KB of this forum but when I run it, I get a Path/File access error with "Open ObscurePath & ObscureFile For Output As #1" highlighted as the problem line. When I go to the location where the log file is supposed to be saved, it isn't there. Any suggestions???
I am running Excel 2010.

TMShucks
03-09-2012, 03:48 PM
You need to edit these lines:


Const ObscurePath$ = "C:\"
Const ObscureFile$ = "TestFileLog.Log"



With Windows 7, you seem not to be able to create files in the root directory. The file itself should be created the first time the workbook is opened.

You'll need to ensure that you pick a folder that you know exists on every user's system.

Regards, TMS