Group:  Microsoft Excel ยป microsoft.public.excel.newusers
Thread: Hide a text box

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Hide a text box
Orf Bartrop <orf[ at ]southcom.com.au> 09.08.2006 04:45:55
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
Re: Hide a text box
SteveW <sj_walton[ at ]nothotmail.com> 09.08.2006 05:53:41
Under my Excel - 2000
I don't think you can hide a text box
But I hope Im wrong it would be a good idea

Steve

On Wed, 09 Aug 2006 05:45:55 +0100, Orf Bartrop <orf[ at ]southcom.com.au> =

wrote:

[Quoted Text]
> On sheet 3 of my workbook I have created a button (button 62) and a te=
xt =

> 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
Re: Hide a text box
Orf Bartrop <orf[ at ]southcom.com.au> 09.08.2006 09:46:35
Well, if I can't hide a text box how else could I create some
instructions that can be turned on or off?

Orf

SteveW wrote:

[Quoted Text]
> Under my Excel - 2000
> I don't think you can hide a text box
> But I hope Im wrong it would be a good idea
>
>> 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
>
Re: Hide a text box
Orf Bartrop <orf[ at ]southcom.com.au> 09.08.2006 10:32:34
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:

[Quoted Text]
> 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
Re: Hide a text box
Max 09.08.2006 12:28:02
Try Martin Green's page at:
http://www.fontstuff.com/ebooks/ebookextracontent.htm#msg

Download his sample file :
RecordingExcelMacros.zip [19 KB]

On each sheet in the sample file, he demos how it's done
using Form toolbar buttons: "Show/Hide Explanation"
Look for his sub in VBE: Sub ShowHideTextBox
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Orf Bartrop" wrote:
[Quoted Text]
> Well, if I can't hide a text box how else could I create some
> instructions that can be turned on or off?
>
> Orf
>
> SteveW wrote:
>
> > Under my Excel - 2000
> > I don't think you can hide a text box
> > But I hope Im wrong it would be a good idea
> >
> >> 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
> >
>
Re: Hide a text box
"Alan" <alan111[ at ]ntlworld.com> 09.08.2006 12:41:10
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...
[Quoted Text]
> 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


Re: Hide a text box
Orf Bartrop <orf[ at ]southcom.com.au> 09.08.2006 13:41:06
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--

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net