I
Ian_Cee
Does anyone know how to make a macro run automatically
when you open a worksheet, and not have to rely on
hitting a button or a shortcut key?
I want the sheet to flash a couple of times, so this is
the code:
' Keyboard Shortcut: Ctrl+y
'
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
End Sub
Cheers
when you open a worksheet, and not have to rely on
hitting a button or a shortcut key?
I want the sheet to flash a couple of times, so this is
the code:
' Keyboard Shortcut: Ctrl+y
'
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Cells.Select
With Selection.Interior
.ColorIndex = 1
.Pattern = xlSolid
End With
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
End Sub
Cheers