Nerdalert314
New Member
- Joined
- Mar 28, 2018
- Messages
- 23
Good morning,
I am using a button to move end of day balances to beginning of day and clear out data. If the button is clicked twice it will move 0's to the beginning balances. I am trying to prevent this from happening. I want the button to only be clicked once until the file has been saved. Since we use the same file everyday I can't just disable after 1 click. Does anyone have any suggestions?
I am using a button to move end of day balances to beginning of day and clear out data. If the button is clicked twice it will move 0's to the beginning balances. I am trying to prevent this from happening. I want the button to only be clicked once until the file has been saved. Since we use the same file everyday I can't just disable after 1 click. Does anyone have any suggestions?
HTML:
Sub Clear()
'
' Clear Macro
Sheets("Blotter").Select
Sheets("Blotter").Range("C9").Copy
Sheets("Blotter"). Range("K6").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Blotter").Range("K44").Copy
Sheets("Blotter"). Range("K4").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Blotter"). Range("K44,K10:K14, K17:K18, K25:K31").FormulaR1C1 = "0"
Sheets("Blotter").Range("E10:E15,E17:E35, D49:D51").ClearContents
Sheets("Difference Ticket Totals").Select
Sheets("Difference Ticket Totals").Range("B4").Copy
Sheets("Difference Ticket Totals").Range("B1").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Shadow Posting").Select
Sheets("Shadow Posting").Range("B6:D6").Copy
Sheets("Shadow Posting").Range("B2").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Shadow Posting").Range("B6:D6").ClearContents
Sheets("Shadow Posting").Range("B12:C12, B17:C17, B26:C26, B34:C34, E12:E15, E17:E24, E26:E32, E34:E38, G24,G32, G34:G38").ClearContents
Sheets("Outstanding Checks").Select
Sheets("Outstanding Checks").Range("B3:B9").Copy
Sheets("Outstanding Checks").Range("C3").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Outstanding Checks").Range("B6:B8").FormulaR1C1 = "0"
Sheets("BLP Balances").Select
Sheets("BLP Balances").Range("B6").Copy
Sheets("BLP Balances").Range("B2").PasteSpecial PASTE:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("BLP Balances").Range("B6, E2:E3").FormulaR1C1 = "0"
Sheets("Staff Proofs-BCS").Select
Sheets("Staff Proofs-BCS").Range("D97:D98, E97:E98, G97:G98").FormulaR1C1 = "0"
Sheets("Staff Proofs-BCS").Range("A67:A86").FormulaR1C1 = "NDT"
Sheets("Staff Proofs-BCS").Range("A67:A86").Select
With Selection.Interior
.Pattern = xlNone
End With
Sheets("Staff Proofs-BCS").Range("B4:Q17, B19:Q54, B59:Q86").FormulaR1C1 = "0"
Sheets("Staff Proofs-BCS").Range("A35:A54").FormulaR1C1 = "CDT#"
Sheets("Staff Proofs-BCS").Range("A35:A54").Select
With Selection.Interior
.Pattern = xlNone
End With
Sheets("Blotter").Select
Range("B1:M1").Select
End Sub