BShady
New Member
- Joined
- Apr 26, 2010
- Messages
- 2
When I open a "master" price sheet, the following code opens an "expiration" message box. The code below it copies a subset of data into a new sheet when I click on a buttton. I'd like to get the expiration message added to that new sheet also. Any ideas?
I'd like to get the above copied into the sheet created by the following code:
Any help is so very much appreciated!
Code:
Sub Auto_Open()
Dim exdate As Date
exdate = "12/31/10"
If Date > exdate Then
MsgBox ("Spreadsheet has Expired")
ActiveWorkbook.Close
End If
MsgBox ("This Workbook is Valid Until " & exdate & " - - - You have " & exdate - Date & " Days left")
I'd like to get the above copied into the sheet created by the following code:
Code:
Sub New_Transfer_Price_Sheet()
'
' New_Transfer_Price_Sheet Macro
' Macro recorded 4/14/2010 by rshadis
'
'
Dim NewWrkBook As Excel.Workbook
Set NewWrkBook = Application.Workbooks.Add
Windows("2010 Unprotected Parts Pricing MASTER.xls").Activate
Range("A1:D65536,I1:I65536").Select
Selection.Copy
NewWrkBook.Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells.Select
Cells.EntireColumn.AutoFit
End Sub
Any help is so very much appreciated!