Hello There,
I have a table in a worksheet and have defined the below procedure. When I select the entire worksheet, I get the error message 'Overflow'. When I select multiple rows, it works fine.
Could you please advise, how to overcome the above error?
Thanks & regards
Don
I have a table in a worksheet and have defined the below procedure. When I select the entire worksheet, I get the error message 'Overflow'. When I select multiple rows, it works fine.
Could you please advise, how to overcome the above error?
Thanks & regards
Don
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim tb As ListObject, CBuyerName As String, CBuyerVATNumber As String
'On Error Resume Next
If Target.Count > 1 Then Exit Sub
Target.Calculate
Application.ScreenUpdating = False
Application.EnableEvents = False
'Cells.RowHeight = 15
If Not Intersect(Target, Range("WRMWire")) Is Nothing Then
Range(Range("z1").Value).RowHeight = Range("z2").Value
Range("Z2") = Target.RowHeight
Range("Z1") = Target.Address
Target.RowHeight = 25
'Make current row font size 11
'Rows(1).Font.Size = 10.5
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub