gheyman
Well-known Member
- Joined
- Nov 14, 2005
- Messages
- 2,347
- Office Version
- 365
- Platform
- Windows
This code is supposed to be a simple copy some columns from one tab and paste them on another.
It appears to be functioning, but no values are being pasted.
It appears to be functioning, but no values are being pasted.
Code:
Private Sub CommandButton1_Click()
'
' To unprotect sheet without password
ActiveSheet.Unprotect
' Copy Over Columns
Sheets("Basis_of_Estimates").Select
Columns("A:C").Copy
' Selection.Copy
Sheets("Load_Table").Select
Columns("A:C").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Basis_of_Estimates").Select
Columns("D:D").Copy
Sheets("Load_Table").Select
Columns("E:E").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' Sheets("Basis_of_Estimates").Select
' Columns("W:AC").Copy
' Sheets("Load_Table").Select
' Columns("F:L").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
' :=False, Transpose:=False
' Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
' SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
'
' Add Totals
'Sheets("Load_Table").Select
'Range("L1").Select
'ActiveCell.FormulaR1C1 = "=SUM(R[5]C[-6]:R[1014]C)"
'Range("L2").Select
'ActiveWindow.SmallScroll Down:=-36
'ActiveCell.FormulaR1C1 = "=SUM(Basis_of_Estimates!C[-3])"
'Range("F3:L3").Select
'
' Pull in PLCs
'Range("D5").Select
'ActiveCell.FormulaR1C1 = "PLC"
'Columns("C:C").Select
'Selection.Copy
'Columns("D:D").Select
'Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
' SkipBlanks:=False, Transpose:=False
'Application.CutCopyMode = False
'Range("D6").Select
'ActiveCell.FormulaR1C1 = _
' "=INDEX('Function Cross Reference'!C[-1],MATCH(Load_Table!RC[-1],'Function Cross Reference'!C[-2],0))"
'Range("D6").Select
'Selection.Copy
'Range("D6:D1015").Select
'Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
' SkipBlanks:=False, Transpose:=False
'Range("D6").Select
'Application.CutCopyMode = False
End Sub