PC Review


Reply
Thread Tools Rate Thread

Hide a text box

 
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
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
 
Reply With Quote
 
 
 
 
SteveW
Guest
Posts: n/a
 
      9th Aug 2006
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 <(E-Mail Removed)>
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

 
Reply With Quote
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
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

>

 
Reply With Quote
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
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

 
Reply With Quote
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      9th Aug 2006
Try Martin Green's page at:
http://www.fontstuff.com/ebooks/eboo...ontent.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:
> 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

> >

>

 
Reply With Quote
 
Alan
Guest
Posts: n/a
 
      9th Aug 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Orf Bartrop
Guest
Posts: n/a
 
      9th Aug 2006
Thanks to one and all for your help. I used your code Alan and it did
the job - thanks.
Orf

Alan wrote:

>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" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>
>
>>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
>>>
>>>

>
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I hide a text box or reveal a text box in power point GNeitz Microsoft Powerpoint 2 23rd Jun 2009 11:06 AM
hide all text between [ ] (square brackets) and hide thebrackets. jbesr1230 Microsoft Word Document Management 1 9th Apr 2008 07:20 AM
Way to hide text without hidden text font? teedilo@gmail.com Microsoft Word Document Management 6 11th Dec 2005 10:53 PM
Hide text from printing - can view text on document =?Utf-8?B?U2hhbm5vbiBU?= Microsoft Word Document Management 2 28th Dec 2004 08:20 PM
Show/Hide text based on a click of underlined text Cathy Microsoft Word Document Management 1 17th Jun 2004 10:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 PM.