PDA

View Full Version : HOW TO COMBINE 2 MACRO INTO 1



cyee
11-02-2018, 02:00 AM
Hi Pro,

I have recorded following macro. However, would like your professional help.
I need to create 2 button for this 2 macro. Could I combine it & use only 1 button?

Means 1 click for with colour, another click without colour.

TIA


Sub CONTAINER_DOC()'
' CONTAINER_DOC Macro
'


'
Sheets("INV").Select
Range("AC67:AC73").Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AC$74"
Sheets("PL").Select
Range("Y18").Select
Range("AC62:AC68").Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AC$69"
Range("P70").Select
Sheets("INV").Select
Range("S63").Select
End Sub
Sub CONTAINER_DOC_WSIGN()
'
' CONTAINER_DOC_WSIGN Macro
'


'

Sheets("INV").Select
Range("AC67:AC73").Select
Range("AC73").Activate
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AC$73"
Sheets("PL").Select
ActiveWindow.SmallScroll Down:=0
Range("AB62:AC68").Select
Range("AB68").Activate
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
ActiveSheet.PageSetup.PrintArea = "$A$1:$AC$68"
Sheets("INV").Select
Range("U73").Select
End Sub