Prepare v3

master
Dan Howe 5 years ago
parent 4ce812e006
commit f8f5bce994

@ -1,16 +1,14 @@
Sub R_More_50() Sub MECR_35()
' '
' R_More_50 Macro ' R_More_50 Macro
' '
Range("G2").Select Range("G2").Select
ActiveCell.FormulaR1C1 = "0.10"
Range("I2").Select
ActiveCell.FormulaR1C1 = "0.35" ActiveCell.FormulaR1C1 = "0.35"
' MsgBox Application.Caller - use this to check what the option button is called ' MsgBox Application.Caller - use this to check what the option button is called
End Sub End Sub
Sub R_Less_50() Sub MECR_50()
' '
' R_Less_50 Macro ' R_Less_50 Macro
@ -24,8 +22,6 @@ Sub R_Less_50()
If X = False Then If X = False Then
Range("G2").Select Range("G2").Select
ActiveCell.FormulaR1C1 = "0.25"
Range("I2").Select
ActiveCell.FormulaR1C1 = "0.50" ActiveCell.FormulaR1C1 = "0.50"
Else Else
MsgBox "The worksheet is protected please unlock worksheet to select this option." & vbNewLine & "Please see the WRL Manager Mr Grantley Smith" MsgBox "The worksheet is protected please unlock worksheet to select this option." & vbNewLine & "Please see the WRL Manager Mr Grantley Smith"
@ -52,6 +48,9 @@ Sub copytemp()
Sheets("Salary Information").Visible = False Sheets("Salary Information").Visible = False
Sheets("RPU Budget_Template").Visible = True Sheets("RPU Budget_Template").Visible = True
'creates a copy of the "project template" with the project name to start pasting information
Sheets("RPU Budget_Template").Select Sheets("RPU Budget_Template").Select
Sheets("RPU Budget_Template").Copy After:=Sheets(3) Sheets("RPU Budget_Template").Copy After:=Sheets(3)
Sheets("RPU Budget_Template (2)").Select Sheets("RPU Budget_Template (2)").Select
@ -63,7 +62,7 @@ Sub copytemp()
Sheets(projectname).Select Sheets(projectname).Select
' adds project details ' adds project details
Range("B3").Select Range("B3").Select
Application.CutCopyMode = False Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "='Project Information'!R[-2]C[2]" ActiveCell.FormulaR1C1 = "='Project Information'!R[-2]C[2]"
@ -75,11 +74,11 @@ Sub copytemp()
ActiveCell.FormulaR1C1 = "='Project Information'!RC:RC[3]" ActiveCell.FormulaR1C1 = "='Project Information'!RC:RC[3]"
Range("F1").Select Range("F1").Select
'adds generation timestamp 'adds generation timestamp
ActiveCell.FormulaR1C1 = "=NOW()" ActiveCell.FormulaR1C1 = "=NOW()"
Range("F2").Select Range("F2").Select
'copy staff 'copy staff
Sheets("Project Information").Select Sheets("Project Information").Select
Range("D13:M13").Select Range("D13:M13").Select
Selection.Copy Selection.Copy
@ -92,18 +91,18 @@ Sub copytemp()
:=False, Transpose:=True :=False, Transpose:=True
Application.CutCopyMode = False Application.CutCopyMode = False
'copy salary markup 'copy salary markup
Sheets("Project Information").Select Sheets("Project Information").Select
Range("D12:M12").Select Range("D12:M12").Select
Selection.Copy Selection.Copy
Sheets(projectname).Select Sheets(projectname).Select
Range("Q21").Select Range("T21").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True :=False, Transpose:=True
Application.CutCopyMode = False Application.CutCopyMode = False
'copy hours 'copy hours
Sheets("Project Information").Select Sheets("Project Information").Select
Range("D17:M17").Select Range("D17:M17").Select
Selection.Copy Selection.Copy
@ -111,30 +110,8 @@ Sub copytemp()
Range("G21").Select Range("G21").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True :=False, Transpose:=True
' copy mark up percentage
Sheets("Project Information").Select
Range("I2").Select
Selection.Copy
Sheets(projectname).Select
Range("S21").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H8").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Project Information").Select
Range("G2").Select
Selection.Copy
Sheets(projectname).Select
Range("S35").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("S43").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Copy subcontractors 'Copy subcontractors
Sheets("Project Information").Select Sheets("Project Information").Select
Range("C71:C75").Select Range("C71:C75").Select
Selection.Copy Selection.Copy
@ -142,7 +119,7 @@ Sub copytemp()
Range("A35").Select Range("A35").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False :=False, Transpose:=False
'Copy subcontractor prices 'Copy subcontractor prices
Sheets("Project Information").Select Sheets("Project Information").Select
Range("N71:N75").Select Range("N71:N75").Select
Selection.Copy Selection.Copy
@ -153,7 +130,7 @@ Sub copytemp()
Range("F35").Select Range("F35").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False :=False, Transpose:=False
'Copy subcontractor markups 'Copy subcontractor markups
Sheets("Project Information").Select Sheets("Project Information").Select
Range("M71:M75").Select Range("M71:M75").Select
Selection.Copy Selection.Copy
@ -162,7 +139,7 @@ Sub copytemp()
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False :=False, Transpose:=False
'Copy expense items 'Copy expense items
Sheets("Project Information").Select Sheets("Project Information").Select
Range("C78:C92").Select Range("C78:C92").Select
Selection.Copy Selection.Copy
@ -179,7 +156,7 @@ Sub copytemp()
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False :=False, Transpose:=False
'Copy expense prices 'Copy expense prices
Sheets("Project Information").Select Sheets("Project Information").Select
Range("N78:N92").Select Range("N78:N92").Select
Selection.Copy Selection.Copy
@ -196,7 +173,7 @@ Sub copytemp()
Sheets(projectname).Select Sheets(projectname).Select
Range("A1").Select Range("A1").Select
'Copy expense price markups 'Copy expense price markups
Sheets("Project Information").Select Sheets("Project Information").Select
Range("M78:M92").Select Range("M78:M92").Select
@ -208,21 +185,22 @@ Sub copytemp()
Sheets(projectname).Select Sheets(projectname).Select
Range("A1").Select Range("A1").Select
' hides sheets
Sheets("StaffDetails").Visible = False
Sheets("Salary Information").Visible = False
Sheets("RPU Budget_Template").Visible = False
'ProtectSheet 'ProtectSheet
ActiveSheet.Protect AllowInsertingColumns:=False, _ ActiveSheet.Protect AllowInsertingColumns:=False, _
AllowInsertingRows:=False, _ AllowInsertingRows:=False, _
AllowDeletingColumns:=False, _ AllowDeletingColumns:=False, _
AllowDeletingRows:=False AllowDeletingRows:=False
Sheets("Project Information").Select Sheets("Project Information").Select
Range("A1").Select Range("A1").Select
Sheets(projectname).Select
Application.Goto Reference:=Range("a1"), Scroll:=True
' hides sheets
Sheets("StaffDetails").Visible = False
Sheets("Salary Information").Visible = False
Sheets("RPU Budget_Template").Visible = False
End Sub End Sub

Loading…
Cancel
Save