This is the sample code, you can set it up in ExpDate variable
Private Sub Workbook_Open()
Dim ExpDate As Date
ExpDate = #8/17/2013 10:00:00 AM#
If Now > ExpDate Then ThisWorkbook.Close
MsgBox "This workbook will expired at " & Format(ExpDate, "dd mmmm
yyyy hh:mm:ss AM/PM")
End Sub
Rgds,
[dp]
On 29/07/2013 15:39, Kannan Excel wrote:
can u do me a favor???
i don't want user and pswd...
i want vb coding for expire date and time
pls send that code how to set date and time to expire
On Mon, Jul 29, 2013 at 1:16 PM, De Premor <d...@premor.net
<mailto:d...@premor.net>> wrote:
try this attached file
user, pass, and expiration date defined in a sheet
On 29/07/2013 13:05, Mangesh Vimay wrote:
Thanks for asking this query.
Appreciate your mind !!!
And also thanks De Pemor for the solution.
Have a great day all !!!
On 7/29/13, Kannan Excel <kannan.ex...@gmail.com
<mailto:kannan.ex...@gmail.com>> wrote:
Hi,
I want to set particular date and* time* also for expire
.... is this
possible.???
Or i want to set date and time for password...
When i set date and time, password will appear
automatically....
pls do the needful ASAP...
On Sat, Jul 27, 2013 at 3:19 PM, De Premor <d...@premor.net
<mailto:d...@premor.net>> wrote:
Using macro, but required user to run the macro
This is the basic, user still can skip this by
changing date on his
computer
Private Sub Workbook_Open()
Dim Expired As Date
Expired = "20 Jul 2013"
If Now() > Expired Then
MsgBox "File " & ThisWorkbook.FullName & "
expired"
ThisWorkbook.Close
End If
End Sub
Next step, you may add a cell validation on current
file to avoid skipped
by user with changin the date on his computer
Once the expiration msg appear, it will write in
sheet1 cell A1 a word
EXPIRED, then everytime file open, it will check that
cell and also the
date on current computer, if one of that criteria
match then it will
still close the workbook.
If Now() > Expired or *Sheet1**.Range(**"A1") =
"EXPIRED"* Then
MsgBox "File " & ThisWorkbook.FullName & "
expired"
*if Sheet1**.Range(**"A1") <> "EXPIRED" then
** Sheet1.Range("A1") = "EXPIRED"**
* *ThisWorkbook.Save
End If
* ThisWorkbook.Close
End If
Rgds,
[dp]
Pada 27/07/2013 15:55, Kannan Excel menulis:
Hi,
how to make a file expire after a period of time.
regards
Kannan V
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do
you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of
this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread
titles, like Please
Help, Urgent, Need Help, Formula Problem, Code
Problem, and Need Advice
will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or
bypassing any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not
allowed.
NOTE : Don't ever post confidential data in a
workbook. Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed
to the Google Groups
"MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving
emails from it, send an
email to excel-macros+unsubscr...@googlegroups.com
<mailto:excel-macros%2bunsubscr...@googlegroups.com>.
To post to this group, send email to
excel-macros@googlegroups.com
<mailto:excel-macros@googlegroups.com>.
Visit this group at
http://groups.google.com/group/excel-macros.
For more options, visit
https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do
you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of
this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread
titles, like Please
Help, Urgent, Need Help, Formula Problem, Code
Problem, and Need Advice
will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or
bypassing any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not
allowed.
NOTE : Don't ever post confidential data in a
workbook. Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed
to the Google Groups
"MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving
emails from it, send an
email to excel-macros+unsubscr...@googlegroups.com
<mailto:excel-macros%2bunsubscr...@googlegroups.com>.
To post to this group, send email to
excel-macros@googlegroups.com
<mailto:excel-macros@googlegroups.com>.
Visit this group at
http://groups.google.com/group/excel-macros.
For more options, visit
https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you
wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this
forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread
titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem,
and Need Advice will
not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing
any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not
allowed.
NOTE : Don't ever post confidential data in a workbook.
Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed to
the Google Groups
"MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails
from it, send an
email to excel-macros+unsubscr...@googlegroups.com
<mailto:excel-macros%2bunsubscr...@googlegroups.com>.
To post to this group, send email to
excel-macros@googlegroups.com
<mailto:excel-macros@googlegroups.com>.
Visit this group at
http://groups.google.com/group/excel-macros.
For more options, visit
https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna
be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this
forum @ https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like
Please Help, Urgent, Need Help, Formula Problem, Code Problem, and
Need Advice will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any
security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum
owners and members are not responsible for any loss.
--- You received this message because you are subscribed to the
Google Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to excel-macros+unsubscr...@googlegroups.com
<mailto:excel-macros%2bunsubscr...@googlegroups.com>.
To post to this group, send email to excel-macros@googlegroups.com
<mailto:excel-macros@googlegroups.com>.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like
Please Help, Urgent, Need Help, Formula Problem, Code Problem, and
Need Advice will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security
measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum owners
and members are not responsible for any loss.
---
You received this message because you are subscribed to the Google
Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.
--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
https://www.facebook.com/discussexcel
FORUM RULES
1) Use concise, accurate thread titles. Poor thread titles, like Please Help,
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.
NOTE : Don't ever post confidential data in a workbook. Forum owners and
members are not responsible for any loss.
---
You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.