This is a multi-part message in MIME format. --------------080204060103040704090707 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit
Thanks to one and all for your help. I used your code Alan and it did the job - thanks. Orf
Alan wrote:
[Quoted Text] >Try this with a button created from the View > Toolbars > Forms menu, right >click and assign this macro to the button, > >Sub ToggleTextBox() >If ActiveSheet.Shapes("Text Box 63").Visible = True Then >ActiveSheet.Shapes("Text Box 63").Visible = False >Else >ActiveSheet.Shapes("Text Box 63").Visible = True >End If >End Sub > >Regards, >Alan. >"Orf Bartrop" <orf[ at ]southcom.com.au> wrote in message >news:uq29H85uGHA.3428[ at ]TK2MSFTNGP02.phx.gbl... > > >>What I have been trying with no luck is: >> >>Private Sub ToggleButton62_Click() >> If ToggleButton62.Value = True Then >> TextBox63.HideSelection = False >> ToggleButton62.Caption = "Selection Visible" >> Else >> TextBox63.HideSelection = True >> ToggleButton62.Caption = "Selection Hidden" >> End If >>End Sub >> >>It stops on the If line. >> >>Orf >>Orf Bartrop wrote: >> >> >> >>>On sheet 3 of my workbook I have created a button (button 62) and a text >>>box (textbox 63). >>>What I want to do is use the button to toggle the text box on and off. By >>>that I want to be able to show the box or hide the box. >>>I have tried to copy code from the MS Visual Basic Help but it did not >>>work, basically because I have no idea what I am doing. >>>Can someone lease help? >>> >>>Orf Bartrop >>> >>> > > > >
--------------080204060103040704090707 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Thanks to one and all for your help. I used your code Alan and it did the job - thanks.<br> Orf<br> <br> Alan wrote:<br> <blockquote cite="midOGdQZE7uGHA.4472[ at ]TK2MSFTNGP02.phx.gbl" type="cite"> <pre wrap="">Try this with a button created from the View > Toolbars > Forms menu, right click and assign this macro to the button,
Sub ToggleTextBox() If ActiveSheet.Shapes("Text Box 63").Visible = True Then ActiveSheet.Shapes("Text Box 63").Visible = False Else ActiveSheet.Shapes("Text Box 63").Visible = True End If End Sub
Regards, Alan. "Orf Bartrop" <a class="moz-txt-link-rfc2396E" href="mailto:orf[ at ]southcom.com.au"><orf[ at ]southcom.com.au></a> wrote in message <a class="moz-txt-link-freetext" href="news:uq29H85uGHA.3428[ at ]TK2MSFTNGP02.phx.gbl">news:uq29H85uGHA.3428[ at ]TK2MSFTNGP02.phx.gbl</a>... </pre> <blockquote type="cite"> <pre wrap="">What I have been trying with no luck is:
Private Sub ToggleButton62_Click() If ToggleButton62.Value = True Then TextBox63.HideSelection = False ToggleButton62.Caption = "Selection Visible" Else TextBox63.HideSelection = True ToggleButton62.Caption = "Selection Hidden" End If End Sub
It stops on the If line.
Orf Orf Bartrop wrote:
</pre> <blockquote type="cite"> <pre wrap="">On sheet 3 of my workbook I have created a button (button 62) and a text box (textbox 63). What I want to do is use the button to toggle the text box on and off. By that I want to be able to show the box or hide the box. I have tried to copy code from the MS Visual Basic Help but it did not work, basically because I have no idea what I am doing. Can someone lease help?
Orf Bartrop </pre> </blockquote> </blockquote> <pre wrap=""><!---->
</pre> </blockquote> </body> </html>
--------------080204060103040704090707--
|