View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dnereb[_34_] Dnereb[_34_] is offline
external usenet poster
 
Posts: 1
Default UserVal default value


You could use the on_change event of the workbook to do this:


Code:
--------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'if the target contains multiple cells do nothing
If Target.Columns.Count 1 Or Target.Rows.Count 1 Then Exit Sub

'If the target is empty on changing it store a standard value
If Len(Cells(Target.Row, Target.Column) & "") = 0 Then
Cells(Target.Row, Target.Column) = "Standard Value"
End If
--------------------


It probably needs a bit of tinkering for your needs. but this VBA does
the BASIC if you place it in the workbook.
Quastions? mail me.


--
Dnereb


------------------------------------------------------------------------
Dnereb's Profile: http://www.excelforum.com/member.php...o&userid=26182
View this thread: http://www.excelforum.com/showthread...hreadid=490215