Sub main()
macro1
macro2
macro3
End Sub
Sub macro1()
If MsgBox("exit sub?", 36, "MACRO1") = vbYes Then Exit Sub
MsgBox "you didn't press YES", 64, "MACRO1"
End Sub
Sub macro2()
If MsgBox("end?", 36, "MACRO2") = vbYes Then End
MsgBox "you didn't press YES", 64, "MACRO2"
End Sub
Sub macro3()
MsgBox "Third macro", 64, "MACRO3"
End Sub
Sub border_highlight_macro()
With ActiveSheet
.Range(.Cells(9, 4), .Cells(50, 4)).Borders.LineStyle = Excel.XlLineStyle.xlLineStyleNone
.Range("D9:D50").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("E9:E50").Select
Range("E50").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 13434828
.TintAndShade = 0
.PatternTintAndShade = 0
End With
This is an old thread, however it pertains to a problem I'm having.
Last line is End Sub - error expected End With.
I changed it to End With - error expected End Sub.
I'm really missing something . .. .
Code:Sub border_highlight_macro() With ActiveSheet .Range(.Cells(9, 4), .Cells(50, 4)).Borders.LineStyle = Excel.XlLineStyle.xlLineStyleNone .Range("D9:D50").Select With Selection.Interior .Pattern = xlNone .TintAndShade = 0 .PatternTintAndShade = 0 End With Range("E9:E50").Select Range("E50").Activate With Selection.Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 13434828 .TintAndShade = 0 .PatternTintAndShade = 0 End With
Appreciate any help with this,
Mike