KingSwish828
Board Regular
- Joined
- Jul 13, 2010
- Messages
- 84
Hello,
I was hoping I could get some help with a adding a timebomb to another macro on a workbook, without an expiration date appearing when the workbook is open. I am using excel 2007 and I am not certain if I can jsut add it at it anywhere in the macro.
Here is the macro that I want to hide the timebomb in:
Sub Sort_1()
'
' Sort_1 Macro
'
'
ChDir "F:\AR Correspondence Shared\QA folder\NEW QA FORMAT\TXT FILES\New Macro"
Workbooks.OpenText Filename:= _
"F:\AR Correspondence Shared\QA folder\NEW QA FORMAT\TXT FILES\New Macro\data.txt" _
, Origin:=437, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(16, 1), Array(25, 1), Array(82, 1), Array(87, 1), Array(106 _
, 1), Array(116, 1), Array(127, 2), Array(141, 1), Array(186, 1), Array(196, 1), Array(202, _
1)), TrailingMinusNumbers:=True
Cells.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Cells.EntireColumn.AutoFit
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
Rows("4:6").Select
Selection.Delete Shift:=xlUp
Rows("6:6").Select
Selection.Delete Shift:=xlUp
Range("A5:G88262").Select
ActiveWorkbook.Worksheets("data").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("data").Sort.SortFields.Add Key:=Range("F5:F88254") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("data").Sort
.SetRange Range("A5:G88254")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("M8").Select
ActiveWindow.ScrollRow = 11879
ActiveWindow.ScrollRow = 12745
ActiveWindow.ScrollRow = 13116
End Sub
I was hoping I could get some help with a adding a timebomb to another macro on a workbook, without an expiration date appearing when the workbook is open. I am using excel 2007 and I am not certain if I can jsut add it at it anywhere in the macro.
Here is the macro that I want to hide the timebomb in:
Sub Sort_1()
'
' Sort_1 Macro
'
'
ChDir "F:\AR Correspondence Shared\QA folder\NEW QA FORMAT\TXT FILES\New Macro"
Workbooks.OpenText Filename:= _
"F:\AR Correspondence Shared\QA folder\NEW QA FORMAT\TXT FILES\New Macro\data.txt" _
, Origin:=437, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(16, 1), Array(25, 1), Array(82, 1), Array(87, 1), Array(106 _
, 1), Array(116, 1), Array(127, 2), Array(141, 1), Array(186, 1), Array(196, 1), Array(202, _
1)), TrailingMinusNumbers:=True
Cells.Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Cells.EntireColumn.AutoFit
Columns("A:A").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Columns("H:H").Select
Selection.Delete Shift:=xlToLeft
Rows("4:6").Select
Selection.Delete Shift:=xlUp
Rows("6:6").Select
Selection.Delete Shift:=xlUp
Range("A5:G88262").Select
ActiveWorkbook.Worksheets("data").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("data").Sort.SortFields.Add Key:=Range("F5:F88254") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("data").Sort
.SetRange Range("A5:G88254")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("M8").Select
ActiveWindow.ScrollRow = 11879
ActiveWindow.ScrollRow = 12745
ActiveWindow.ScrollRow = 13116
End Sub
Last edited by a moderator: