ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,699
- Office Version
- 2007
- Platform
- Windows
Hi.
Today ive come across Run time error 13 on my worksheet.
SEE ATTACHED SCREENSHOTS TO ASSIS YOU
Clicking in cekk K4 i see this code in the address bar =SUM(#REF!:OFFSET(K28,,0))
The code in use is supplied below
When i debug the line in red below is shown in yellow
DOWNLOAD SAMPLE HERE
Its supposed to shown a outstanding balance in cell K4
Today ive come across Run time error 13 on my worksheet.
SEE ATTACHED SCREENSHOTS TO ASSIS YOU
Clicking in cekk K4 i see this code in the address bar =SUM(#REF!:OFFSET(K28,,0))
The code in use is supplied below
When i debug the line in red below is shown in yellow
Rich (BB code):
Private Sub Worksheet_SelectionChange(ByVal Target As Range) ' THIS WILL COLOUR ACTIVE CELL & KEEP INTERIOR COLOUR ONCE LEFT HAS BEEN LEFT
Dim myStartCol As String
Dim myEndCol As String
Dim myStartRow As Long
Dim myLastRow As Long
Dim myRange As Range
If Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "NEVER" Or Target.Value = "TBA" Or Target.Value Like "2###" Then Exit Sub
Application.ScreenUpdating = False
' *** Specify columns to apply this to ***
myStartCol = "A"
myEndCol = "K"
' *** Specify start row ***
myStartRow = 7
' Use first column to find the last row
myLastRow = Cells(Rows.Count, myStartCol).End(xlUp).Row
' Build range to apply this to
Set myRange = Range(Cells(myStartRow, myStartCol), Cells(myLastRow, myEndCol))
' Check to see if cell selected is outside of range
If Intersect(Target, myRange) Is Nothing Then Exit Sub
With Target
.Worksheet.Cells.FormatConditions.Delete
.FormatConditions.Add xlExpression, , True
.FormatConditions(1).Interior.Color = vbWhite
End With
With Sheet7.DTPicker1
.Height = 40
.Width = 40
If Not Intersect(Target, Range("G7:H40")) Is Nothing Then
.Visible = True
.Top = Target.Top
.Left = Target.Offset(0, 1).Left
.LinkedCell = Target.ADDRESS
Else
.Visible = False
End If
End With
End Sub
DOWNLOAD SAMPLE HERE
Its supposed to shown a outstanding balance in cell K4