http://www.gruss-software.co.uk/forum/v ... ing+fields
The problem is, while I can get a small sample of this to work, my main code sheet is getting an error, saying that String, array, etc. cannot be declared as Public in an object module. How do I get round this, please?
- Code: Select all
Public sRaceDets As String
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iRow As Integer
Dim iCol As Integer
Dim cell As Object
For Each cell In Target
iRow = cell.Row
iCol = cell.Column
' Check for new race being loaded
If iCol = 1 And iRow = 1 Then
If LCase(cell.Value) <> sRaceDets Then
sRaceDets = LCase(cell.Value)
Application.EnableEvents = False
Sheets("Data").Range("T5:x29").Select
Selection.ClearContents
Sheets("Control").Range("A1").Select
Application.EnableEvents = True
End If
End If
Next cell
End Sub