Hi All,
I have this code for each of my buttons with only one difference highlighted in red 10-100 , 10-300 , 10-350
and I have this code repeated for over 30 times with the same differences, my question is it possible for this code to be compressed into one code and thanks in advance
I have this code for each of my buttons with only one difference highlighted in red 10-100 , 10-300 , 10-350
and I have this code repeated for over 30 times with the same differences, my question is it possible for this code to be compressed into one code and thanks in advance
VBA Code:
Sub Macro20()
'
' Macro15 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Application.ScreenUpdating = False
Sheets("Sheet2").Select
Sheets("Sheet1 (2)").Visible = True
Sheets("Sheet1 (2)").Select
ActiveSheet.Range("$a$1:$G$463").AutoFilter Field:=3, Criteria1:=[COLOR=rgb(226, 80, 65)]"10-100"[/COLOR]
ActiveWindow.SmallScroll Down:=-12
Range("A2:G659").Select
Selection.Copy
Sheets("Pick Form").Select
Range("A:A").Find("").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("a8").Select
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 24")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 255, 255)
.Transparency = 0
.Solid
Range("a8").Select
Sheets("Sheet1 (2)").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Pick Form").Select
Application.ScreenUpdating = True
End With
End Sub
Sub Macro21()
'
' Macro15 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Application.ScreenUpdating = False
Sheets("Pick Form").Select
Sheets("Sheet1 (2)").Visible = True
Sheets("Sheet1 (2)").Select
ActiveSheet.Range("$a$1:$G$463").AutoFilter Field:=3, Criteria1:=[COLOR=rgb(226, 80, 65)]"10-300"[/COLOR]
ActiveWindow.SmallScroll Down:=-12
Range("A2:G659").Select
Selection.Copy
Sheets("Pick Form").Select
Range("A:A").Find("").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("a8").Select
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 33")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 255, 255)
.Transparency = 0
.Solid
Range("a8").Select
Sheets("Sheet1 (2)").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Pick Form").Select
Application.ScreenUpdating = True
End With
End Sub
Sub Macro22()
'
' Macro15 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Application.ScreenUpdating = False
Sheets("Pick Form").Select
Sheets("Sheet1 (2)").Visible = True
Sheets("Sheet1 (2)").Select
ActiveSheet.Range("$a$1:$G$463").AutoFilter Field:=3, Criteria1:=[COLOR=rgb(226, 80, 65)]"10-350"[/COLOR]
ActiveWindow.SmallScroll Down:=-12
Range("A2:G659").Select
Selection.Copy
Sheets("Pick Form").Select
Range("A:A").Find("").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("a8").Select
ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 31")).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 255, 255)
.Transparency = 0
.Solid
Range("a8").Select
Sheets("Sheet1 (2)").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("Pick Form").Select
Application.ScreenUpdating = True
End With
End Sub