Home > Software engineering >  Who is a great god help write a macro code Excel specified time automatically destroyed, changing th
Who is a great god help write a macro code Excel specified time automatically destroyed, changing th

Time:11-15

Who can help to write a macro code, want to Excel automatically destroy to the specified date, no hint! To change the system time will not be affected

CodePudding user response:

What you said is "destroyed" delete files?
Normally only implement "arrived after the specified date/time no longer perform operations", it is impossible to "delete themselves",
In the "run" document, it is in the "open", cannot be deleted files at this time,
If you want to "change the system time is not affected," then you can judge the current time, through access to the network time
Judged not to "local time", which requires to networking,

But to "self-destruct" can have a workaround, is:
When to "self-destruct", through the code, to construct a bat file (or VBS, etc.) and implementation;
To shut itself down and then immediately ", "so that" just be performed "bat or VBS code, you can delete" yourself ",

CodePudding user response:

"Want to Excel to the specified date automatically destroyed" is expired after opens automatically deleted yourself? Or any other meaning?

CodePudding user response:

Thinking is the server gets the current time from the time, and then through the VBA macro instruction will automatically delete all form or into a null value is ok, but disable the macro was not right,

CodePudding user response:

Disable macros you are helpless, or save in XLSX file, or the form content is copied into the new excel file, or external reference file data... Let your macro failure way more,

CodePudding user response:

references 4 floor crispy ice cream response:
disable macros you are helpless, or save in XLSX file, or the form content is copied into the new excel file, or external reference file data... Let your macro failure way more,


If I design, that "focus" is not a form of data;
Even if the data is important, so it must be "encryption", need to run the macro code can decrypt using,

CodePudding user response:

refer to fifth floor a toast to invite the bright moon response:
Quote: refer to 4th floor crispy big ice cream reply:

Disable macros you are helpless, or save in XLSX file, or the form content is copied into the new excel file, or external reference file data... Let your macro failure way more,


If I design, that "focus" is not a form of data;
Even if the data is important, so it must be "encryption", need to run the macro code can decrypt using,


His demand is limited, within the scope of time is allowed to see the data,
It within the time run macros, then Ctrl + A and Ctrl + C, open A new workbook Ctrl + V

Unless your macro limit clipboard, limitations to save and print...
Maybe you limits a heap also encrypted macros, results others know vb call c # excel table directly read data
Maybe you have a good debugging in excel perfect, results in the WPS, who knows out what wrong again,

CodePudding user response:

Actually I also don't say "data" problem,
So this macro, what is the "function", or data problems, do not know,
I personally think that "function" should be the key,


However, even if to macro password, the password is also easy to remove, so also can coax small white,

CodePudding user response:

Sorry, didn't say understand
There is a table with vba code, after opening must run macros, so the macro must be launched,
Company may XieMoShaLv now, so I want to let me deliver software up to
So, I just want to in one day, while I'm gone open this file will be automatically shut down, and take this form to delete, I'm afraid they will change the system time, so the idea is to open automatically shut down time and delete, modify the system time is invalid
Now change the code, open the work table 15 minutes automatically shut down and delete,
Behold a great god can have a solution to modify system time of the problem

CodePudding user response:

Sorry, didn't say understand
There is a table with vba code, after opening must run macros, so the macro must be launched,
Company may XieMoShaLv now, so I want to let me deliver software up to
So, I just want to in one day, while I'm gone open this file will be automatically shut down, and take this form to delete, I'm afraid they will change the system time, so the idea is to open automatically shut down time and delete, modify the system time is invalid
Now change the code, open the work table 15 minutes automatically shut down and delete,
Behold a great god can have a solution to modify system time of the problem

CodePudding user response:

If judgment time or judgment number then
With ThisWorkbook
The Saved=True
. ChangeFileAccess xlReadOnly
Kill the FullName
. Close
End With
end if
  •  Tags:  
  • VBA