View Single Post
  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

Some people can always sniff out a good deal :-)

Bob

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Jan

When you and Bob do get this working properly, please email me a copy.

I like the part where you send me money<g


Gord

On Tue, 25 Jan 2005 09:49:03 -0800, "Jan Buckley"
wrote:

Bob,

Thank you for your response. I'm not very adept at using Macros yet. I
pasted the module as you directed, but don't see any effect on my

worksheet.
I'm sure I've not "connected all the dots". How do I make the code

effective?
Sorry to be such a pest.

Jan


"Bob Phillips" wrote:

Jan,

Try this

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.NumberFormat = "$#,##0.00" Then
If Me.Range("H10").Value <= 0 Then
Target.Value = ""
MsgBox "Contact Jan for more money"
End If
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


Change the balance cell (H10 in my example) to suit.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jan Buckley" wrote in message
...
I want to format a worksheet so that only credit inputs are allowed
(amounts
less than 0) in any cell formatted as a number cell, whenever the

cell
containing the spreadsheet balance is less than or equal to zero.

This is
a
spreadsheet where purchases are logged and a balance is maintained.

If the
balance falls below zero, users are supposed to contact me for more

money,
but they do not, and continue to log entries when the balance is in

the
red.
I want to prevent them from making any entries that will cause the

balance
to
fall below zero. I do want to allow them to make entries that will
increase a
balance that is at or below zero. Can anyone help?