EDITED:
I need the below mentioned code in Excel to work within the range of the sheet, so that the copy/paste work within the range of the sheet. C2:C81
As of now, i can only get the compbox to work making copy/paste between the C2 and C3
I need this code to work throughout the sheet, how do I do that?![]()
Private Sub CommandButton2_Click() If Me.ComboBox1 = Database.Range("C2") And Me.ComboBox2 = Database.Range("C3") Then Database.Range("A2:C2").Copy Database.Range("A100:C100").Insert Database.Range("A3:C3").Copy Database.Range("A2:C2").PasteSpecial Database.Range("A100:C100").Copy Database.Range("A3:C3").PasteSpecial Database.Range("A100:C100").clear Database.Range("C2:C81").Sort Key1:=Database.Range("C2"), Order1:=xlAscending, Header:=xlYes End If End Sub
Tank you in advance
Bookmarks