Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Auto_Open, Expiry Date of VBA application.

Dear Sir,

I am using the below mentioned macro in my project, for Limit of my
VBA project for the certain time. (life time of this vba application).

it is working fine, but the problem is this, if I want to increase the
no. of days for one month or more, then I have to open VBA Editor and
then change the Date in Auto_Open Macro.

Is there any way to change the Expiry date of VBA program fdirectly
from the worksheet, not from VBA Editor.

Supose if I put the date in Sheet1, A1=15-Jul-2008, then it will
change in the auto_open macro automatically.

if any one have any suggession, pls send me.

Thank you for support in Advance. my code is given below

Shahzad zafar


Sub auto_open()

If Date #7/15/2008# Then ' < Expiry date of vba program
MsgBox "RunTime"
ThisWorkbook.Close
End If

Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False

' to open Login Screen
UserLogin.Show

Application.ScreenUpdating = False

' to protect all sheets with password
Dim n As Integer
For n = 1 To Worksheets.Count
'to protect WORKSHEETS
Worksheets(n).Protect Password:="marketing"
Next n
'to protect WORKBOOK
ActiveWorkbook.Protect Password:="marketing", Structu=True,
Windows:=False

Application.ScreenUpdating = True

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Auto_Open, Expiry Date of VBA application.

You could use:

If Date thisworkbook.worksheets("Sheet999").range("a1").va lue Then



Shazi wrote:

Dear Sir,

I am using the below mentioned macro in my project, for Limit of my
VBA project for the certain time. (life time of this vba application).

it is working fine, but the problem is this, if I want to increase the
no. of days for one month or more, then I have to open VBA Editor and
then change the Date in Auto_Open Macro.

Is there any way to change the Expiry date of VBA program fdirectly
from the worksheet, not from VBA Editor.

Supose if I put the date in Sheet1, A1=15-Jul-2008, then it will
change in the auto_open macro automatically.

if any one have any suggession, pls send me.

Thank you for support in Advance. my code is given below

Shahzad zafar

Sub auto_open()

If Date #7/15/2008# Then ' < Expiry date of vba program
MsgBox "RunTime"
ThisWorkbook.Close
End If

Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False

' to open Login Screen
UserLogin.Show

Application.ScreenUpdating = False

' to protect all sheets with password
Dim n As Integer
For n = 1 To Worksheets.Count
'to protect WORKSHEETS
Worksheets(n).Protect Password:="marketing"
Next n
'to protect WORKBOOK
ActiveWorkbook.Protect Password:="marketing", Structu=True,
Windows:=False

Application.ScreenUpdating = True

End Sub


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Auto_Open, Expiry Date of VBA application.

Hi Shazi


You can use 3 cells on a hidden worksheet or so with

2008
7
15

'Year,Month,Day
If Date DateSerial(Sheets("Sheet1").Range("A1").Value, Sheets("Sheet1").Range("B1").Value, Sheets("Sheet1").Range("C1").Value)
Then

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Shazi" wrote in message ...
Dear Sir,

I am using the below mentioned macro in my project, for Limit of my
VBA project for the certain time. (life time of this vba application).

it is working fine, but the problem is this, if I want to increase the
no. of days for one month or more, then I have to open VBA Editor and
then change the Date in Auto_Open Macro.

Is there any way to change the Expiry date of VBA program fdirectly
from the worksheet, not from VBA Editor.

Supose if I put the date in Sheet1, A1=15-Jul-2008, then it will
change in the auto_open macro automatically.

if any one have any suggession, pls send me.

Thank you for support in Advance. my code is given below

Shahzad zafar


Sub auto_open()

If Date #7/15/2008# Then ' < Expiry date of vba program
MsgBox "RunTime"
ThisWorkbook.Close
End If

Application.DisplayFullScreen = True
Application.CommandBars("Worksheet Menu Bar").Enabled = False

' to open Login Screen
UserLogin.Show

Application.ScreenUpdating = False

' to protect all sheets with password
Dim n As Integer
For n = 1 To Worksheets.Count
'to protect WORKSHEETS
Worksheets(n).Protect Password:="marketing"
Next n
'to protect WORKBOOK
ActiveWorkbook.Protect Password:="marketing", Structu=True,
Windows:=False

Application.ScreenUpdating = True

End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Auto_Open, Expiry Date of VBA application.

On Jun 9, 7:58*pm, Dave Peterson wrote:
You could use:

If Date thisworkbook.worksheets("Sheet999").range("a1").va lue Then





Shazi wrote:

Dear Sir,


I am using the below mentioned macro in my project, for Limit of my
VBA project for the certain time. (life time of this vba application).


it is working fine, but the problem is this, if I want to increase the
no. of days for one month or more, then I have to open VBA Editor and
then change the Date in Auto_Open Macro.


Is there any way to change the Expiry date of VBA program fdirectly
from the worksheet, not from VBA Editor.


Supose if I put the date in Sheet1, *A1=15-Jul-2008, then it will
change in the auto_open macro automatically.


if any one have any suggession, pls send me.


Thank you for support in Advance. my code is given below


Shahzad zafar


Sub auto_open()


* *If Date #7/15/2008# Then * *' < *Expiry date of vba program
* * MsgBox "RunTime"
* *ThisWorkbook.Close
* * End If


* * Application.DisplayFullScreen = True
* * Application.CommandBars("Worksheet Menu Bar").Enabled = False


* ' to open Login Screen
* * UserLogin.Show


Application.ScreenUpdating = False


* * ' to protect all sheets with password
* * Dim n As Integer
* * For n = 1 To Worksheets.Count
* * 'to protect WORKSHEETS
* * Worksheets(n).Protect Password:="marketing"
* * Next n
* * 'to protect WORKBOOK
* * ActiveWorkbook.Protect Password:="marketing", Structu=True,
Windows:=False


Application.ScreenUpdating = True


End Sub


--

Dave Peterson- Hide quoted text -

- Show quoted text -




Hi, Mr. Dave,

I tried your code, it is working very good. you solved my big problem.
Thank you very much.

Now I can change the expiry date of my project from the worksheet at
any time.
Thank you once again.

Best Regards.

Shahzad
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
auto_open problem for Expiry date [email protected] Excel Programming 1 April 24th 08 03:36 PM
VBA FOR expiry Date Alam Excel Programming 5 March 6th 08 02:56 PM
Expiry date Martina Excel Worksheet Functions 6 February 11th 07 09:57 PM
Auto_Open & Application.Quit - Now I can't get back into my macro Astello Excel Programming 4 October 10th 06 07:29 PM
Auto_open & Application.ontime in shared files Jan Grinwis Excel Programming 0 October 17th 04 05:28 PM


All times are GMT +1. The time now is 07:12 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"