Re: VB help
From: Bob Phillips (bob.phillips_at_notheretiscali.co.uk)
Date: 05/09/04
- Next message: TonyJollans: "Re: Challenging Question - Troubleshooting Formula"
- Previous message: Bob Phillips: "Re: Last updated time for cell"
- In reply to: ant: "VB help"
- Next in thread: Tim Zych: "Re: VB help"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 9 May 2004 11:18:31 +0100
Ant,
I am not sure this will do what you want. What it does is to load a - in D5
if the cell is changed to nothing.
How will the cell be initialised, and what is valid and how what happens on
each specific input?
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"ant" <anonymous@discussions.microsoft.com> wrote in message
news:a60a01c43571$6a317820$a301280a@phx.gbl...
> Someone gave me this code... Im new at VB and dont how
> to compile this code or it not working
> I just want cell D5 to be "-" as its default value until
> the user enters a number
>
> Please help
>
> Private Sub Worksheet_Change(ByVal Target As Excel.Range)
> With Target
> If .Count > 1 Then Exit Sub
> If Not Intersect(.Cells, .Range("D5")) Is
> Nothing Then _
> If IsEmpty(.Value) Then _
> .Value = "-"
> End With
> End Sub
>
- Next message: TonyJollans: "Re: Challenging Question - Troubleshooting Formula"
- Previous message: Bob Phillips: "Re: Last updated time for cell"
- In reply to: ant: "VB help"
- Next in thread: Tim Zych: "Re: VB help"
- Messages sorted by: [ date ] [ thread ]