Sunaj,
Please see my code below;
Dim Disable As Boolean
Private Sub DisableSpread(X As TextBox, Txt As String)
Disable = True
X.Text = Txt
Disable = False
End Sub
Private Sub sprBOMDets_Click(ByVal Col As Long, ByVal Row As Long)
If Col = 0 Then
For i = 1 To 4
sprBOMDets.Col = Col + i
sprBOMDets.Row = Row
If i = 1 Then
DisableSpread txtComponent, sprBOMDets.Text
ElseIf i = 2 Then
DisableSpread txtQty_Use, sprBOMDets.Text
ElseIf i = 3 Then
DisableSpread txtUM, sprBOMDets.Text
ElseIf i = 4 Then
DisableSpread txtNotes, sprBOMDets.Text
End If
Next i
End If
End Sub