Thread: Disable Button
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Disable Button

Pete,
Put a qualifier in the loop that subtracts the numbers so the macro will
end.
If Range ("A1").value=0 Then
Exit Sub


"Pete" wrote in message
...
Hi, can anyone help me with a problem using excel macros?

I have a macro that will take away numbers from a value
that is provided in Cell A1. The problem is that when the
cell reaches Zero i would like to stop the button from
working. Because at the moment all i get is A1 going into
minus figures and that makes the rest of the spreadsheet
go wrong.

Thanks for looking.

Pete