View Single Post
  #1   Report Post  
arceaf arceaf is offline
Junior Member
 
Posts: 8
Post Help merging two VBA codes

Hi,

I'm having a bit of difficulty merging two different VBA functions into one button.

This the the button code:

Select Code copy to clipboard
Private Sub CommandButton2_Click()

With Sheets("Recommendations Calc").Range("A" & Rows.Count).End(xlUp)
.Offset(1, 0).Value = Sheets("Decision Matrix").Range("C2").Value
.Offset(1, 1).Value = Sheets("Decision Matrix").Range("h55").Value
.Offset(1, 4).Value = Sheets("Decision Matrix").Range("I55").Value
deletedup '<--call the macro to delete the dup. and put the last data entry.
End With

End Sub


And this is the other VBA code:


Select Code copy to clipboard
Sub thebigcopy()
'
' thebigcopy Macro
'

'
ActiveWindow.SmallScroll Down:=-21
Columns("A:B").Select
Selection.Copy
Sheets("Recommendations").Select
Columns("A:B").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Recommendations Calc").Select
Columns("E:E").Select
Application.CutCopyMode = False
Selection.Copy
Range("C37").Select
Sheets("Recommendations").Select
Columns("E:E").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub



I want to merge the 2nd code into the 1st button VB code

Can anyone help me?

Thank You!!