View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Les Les is offline
external usenet poster
 
Posts: 240
Default "Toggle Switch" help needed

Thanks so much for the replies, all great
--
Les


"Mike H" wrote:

les,

I'm not sure what you mean by an 'Edit Button' so this is a 'Toggle Button'
from the Control toolbox.

Set the caption to 'Edit' right click the button, view code and paste this in

Private Sub ToggleButton1_Click()
With ToggleButton1
If .Caption = "Edit" Then
Range("A1").Value = 1
.Caption = "Done"
Else
Range("A1").Value = ""
.Caption = "Edit"
End If
End With
End Sub


Mike

"Les Stout" wrote:

Hi all, this is probably so easy but it is eluding me !!

I need to make an edit button that inserts a 1 in A1 and the caption
then changes to "DONE" and when clicked again it removes the 1 from A1
and the caption then changes back to "EDIT"


Best regards,

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***