I guess there is more happening here.... I was just wondering if I can make
it run a little faster! On a slower machine....
Private Sub OptionButton1_Change()
Dim ssConstants
If OptionButton1.Value = True Then
Sheet1.Range("P1").Value = 5
Spreadsheet1.ActiveSheet.Unprotect
Call border_reset
Set ssConstants = Spreadsheet1.Constants
Spreadsheet1.Worksheets("Sheet1").Range("B2:B4").BorderAround ,
ssConstants.xlMedium, 3
Spreadsheet1.Worksheets("Sheet1").Range("B6:B44").BorderAround ,
ssConstants.xlMedium, 3
Spreadsheet1.Worksheets("Sheet1").Range("B46:B47").BorderAround ,
ssConstants.xlMedium, 3
Spreadsheet1.Worksheets("Sheet1").Range("B49").BorderAround ,
ssConstants.xlMedium, 3
Call diff_reset
Call Chk_Concern
Spreadsheet1.ActiveSheet.Protect
End If
End Sub
Public Sub border_reset()
Dim ssConstants
Set ssConstants = Spreadsheet1.Constants
Spreadsheet1.Worksheets("Sheet1").Range("D2
4").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("F2:F4").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("H2:H4").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("J2:J4").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("B2:B4").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("D6
44").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("F6:F44").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("H6:H44").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("J6:J44").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("B6:B44").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("D46
47").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("F46:F47").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("H46:H47").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("J46:J47").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("B46:B47").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("D49").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("F49").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("H49").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("J49").BorderAround ,
ssConstants.xlHairline, 1
Spreadsheet1.Worksheets("Sheet1").Range("B49").BorderAround ,
ssConstants.xlHairline, 1
End Sub
Public Sub diff_reset()
For i = 6 To 49
Spreadsheet1.Cells(i, 16).Value = Sheet1.Cells(i, 16).Value
If Spreadsheet1.Cells(i, 16).Value < 0 Then
Spreadsheet1.Cells(i, 16).Font.Color = vbRed
Spreadsheet1.Cells(i, 16).Font.Bold = True
ElseIf Spreadsheet1.Cells(i, 16).Value > 0 Then
Spreadsheet1.Cells(i, 16).Font.Color = vbBlue
Spreadsheet1.Cells(i, 16).Font.Bold = True
Else
Spreadsheet1.Cells(i, 16).Font.Color = vbBlack
End If
Next i
End Sub
Public Sub Chk_Concern()
For rRow = 6 To 47
If Spreadsheet1.Cells(rRow, 21).Value = 0 Then
Spreadsheet1.Cells(rRow, 14).Font.Color = vbBlack
Spreadsheet1.Cells(rRow, 14).Font.Bold = True
ElseIf Spreadsheet1.Cells(rRow, 21).Value = 1 Then
Spreadsheet1.Cells(rRow, 14).Font.Color = vbBlue
Spreadsheet1.Cells(rRow, 14).Font.Bold = True
ElseIf Spreadsheet1.Cells(rRow, 21).Value = 2 Then
Spreadsheet1.Cells(rRow, 14).Font.Color = vbRed
Spreadsheet1.Cells(rRow, 14).Font.Bold = True
ElseIf Spreadsheet1.Cells(rRow, 21).Value = 3 Then
Spreadsheet1.Cells(rRow, 14).Font.Color = vbBlack
Spreadsheet1.Cells(rRow, 14).Font.Bold = False
Else
Spreadsheet1.Cells(rRow, 14).Font.Color = vbBlack
Spreadsheet1.Cells(rRow, 14).Font.Bold = False
End If
Next rRow
End Sub