View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
L. Howard Kittle L. Howard Kittle is offline
external usenet poster
 
Posts: 698
Default macro needed please

Maybe something like this...

Sub ZeroOrOne()

If Range("A1").Value = 0 Then
Range("A1").Value = 1
ActiveWindow.SelectedSheets.PrintOut
ElseIf Range("A1").Value = 1 Then
Range("A1").Value = 0
End If

End Sub

HTH
Regards,
Howard

"jackrobyn1" wrote in message
...
i need a macro that will when run will put a number 1 in cell A1 but if
there
is already a number 1 i want the same macro to enter a 0 (zero) i supose
its
a bit like a switch. To sum up exactly what i need.... If there is a 0
(zero)
i want the macro to enter a 1 in cell A1 and then print page 1 of my
"output"
worksheet. If there is already a 1 in A1 then i want it to enter a 0
(zero)
with no print.

Sorry if this seems silly but it really would be useful in what im trying
to
achieve
p.s. the macro will run when i click an auto shape thats assigned to it
Thanks