LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 2 vba join together


how can i put the following 2 vba together, so when the workbook expire
or over the limited, it will be deleted from the system?
1.
Option Explicit
Sub KillMe()
With ThisWorkbook
.Saved = True
.ChangeFileAccess
Mode:=xlReadOnly
Kill .FullName .Close False
End With
End Sub

2.
Private Sub Workbook_Open()
Dim incRange As Range
Dim StartDate As Date
Set incRange = Range("Increment")
StartDate = "19/06/06" 'Date delivered to customer
Sheets("hidden").Visible = xlVeryHidden
incRange = incRange + 1
Me.Save
If incRange 10 Or Date - StartDate 14 Then
Application.DisplayAlerts = False
MsgBox "over the use limit, contact owner"
Me.Close
End If
End Sub


than

--
jinvicto
-----------------------------------------------------------------------
jinvictor's Profile: http://www.excelforum.com/member.php...fo&userid=3409
View this thread: http://www.excelforum.com/showthread.php?threadid=55398

 
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
How can i join these two formulas? Frustrated Excel Worksheet Functions 4 December 31st 09 04:12 AM
I would like to join this group.. Sahil katara Charts and Charting in Excel 1 September 21st 09 07:49 AM
Join tables like inner join in Access ryanp Excel Discussion (Misc queries) 2 July 18th 08 03:35 PM
Join text thanhnguyen[_11_] Excel Programming 2 February 14th 06 09:58 AM


All times are GMT +1. The time now is 01:43 AM.

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

About Us

"It's about Microsoft Excel"