Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 21
Default Hide a text box

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
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 427
Default Hide a text box

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
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

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 21
Default Hide a text box

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


  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Hide a text box

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



  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 21
Default Hide a text box

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



  #6   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 492
Default Hide a text box

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" wrote in message
...
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



  #7   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 21
Default Hide a text box

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" wrote in message
...


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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to hide a text file using macro shirley_kee Excel Discussion (Misc queries) 1 June 5th 06 08:42 AM
Find & Replace text format jmn13 Excel Discussion (Misc queries) 2 May 25th 06 06:18 PM
How do I hide text beyond the last column in Excel? GetVigilant-Jon Excel Discussion (Misc queries) 2 November 23rd 05 11:56 PM
dates and text Sloth Excel Discussion (Misc queries) 0 November 18th 05 04:16 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"