ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,237
- Office Version
- 2007
- Platform
- Windows
Hi,
I wish to run these two codes when i open the worksheet MC LIST.
I wish to add this piece to it also if you could advise me.
Have a nice day.
I wish to run these two codes when i open the worksheet MC LIST.
Code:
Private Sub Worksheet_Activate() Range("A6").Select
Range("A4:G4").Font.Size = 24
Range("A6:G40").Font.Size = 18
Range("A4:G40").Font.Bold = True
Range("A4:G40").Font.ColorIndex = 1
Range("A4:G40").Borders.LineStyle = xlContinuous
Range("A1:G4").Interior.ColorIndex = 4
Range("A6:G40").Interior.ColorIndex = 6
Range("A4:G40").Name = "Calibri"
Range("A4:G5").RowHeight = 36
Range("A6:G40").RowHeight = 30
End Sub
I wish to add this piece to it also if you could advise me.
Code:
Dim x As Long
Application.ScreenUpdating = False
With Sheets("MC LIST")
If .AutoFilterMode Then .AutoFilterMode = False
x = .Cells(.Rows.Count, 1).End(xlUp).Row
.Range("A6:G" & x).Sort key1:=Range("A6"), order1:=xlAscending, Header:=xlGuess
End With
ActiveWorkbook.Save
Application.ScreenUpdating = True
Sheets("MC LIST").Range("A4").Select
Have a nice day.