Can anyone help?!?!
The code below gives and Out of Stack Space error on the highlighted line. I've tried dimming the var at different levels incase that was the problem but it's not. This works in every other Sub in the workbook.
Any help would be appreciated.
Lesley
If Target.Address = "$B$5" Then
Dim ThisCell As String * 14
Dim MidValue As String * 1
ThisCell = Range("B5").Value
If ThisCell <> "" Then
MidValue = Mid(ThisCell, 9, 1)
If MidValue = "-" Then
ThisCell = UCase(ThisCell)
Range("B5").Value = ThisCell
Exit Sub
Else
ErrorStr = "Course code should be in the format XXXXXXXX-X101X"
ErrorBox (ErrorStr)
Range("B5").ClearContents
Range("B5").Select
End If
End If
Exit Sub
End If
The code below gives and Out of Stack Space error on the highlighted line. I've tried dimming the var at different levels incase that was the problem but it's not. This works in every other Sub in the workbook.
Any help would be appreciated.
Lesley
If Target.Address = "$B$5" Then
Dim ThisCell As String * 14
Dim MidValue As String * 1
ThisCell = Range("B5").Value
If ThisCell <> "" Then
MidValue = Mid(ThisCell, 9, 1)
If MidValue = "-" Then
ThisCell = UCase(ThisCell)
Range("B5").Value = ThisCell
Exit Sub
Else
ErrorStr = "Course code should be in the format XXXXXXXX-X101X"
ErrorBox (ErrorStr)
Range("B5").ClearContents
Range("B5").Select
End If
End If
Exit Sub
End If