make VBA text box visible on button

E

easy

I use this bit of code to make an image visible

Sub Show()
ActivePresentation.Slides(15).Shapes(9).Visible = True
End Sub

Is there something similar you can do to make a text box (from the
control box) visible after its default visible property is false

Thanx in advance
 
E

easy

I must be doing something wrong
I have tried this code which works when I run the code from the editor
and switch back to the presentation but it wont run when the
presntation is running
I have assigned Sub TxtBoxShow() to a action button on the slide but it
doesnt have any effect

Sub TxtBoxHide()
Dim otxtBox As TextBox
Set otxtBox = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object
With otxtBox
..Visible = msoFalse

End With

End Sub

Sub TxtBoxShow()

Dim otxtBox As TextBox
Set otxtBox = ActivePresentation.Slides(1).Shapes(1).OLEFormat.Object
With otxtBox
..Text = "Text Box is now visible"
..Visible = msoTrue

End With


End Sub
 
E

easy

Hi Steve
It is probably best to describe what I am trying to achieve with this
code.
I am trying to create a "Virtual Flipchart" where the presenter can
type a list or notes on screen rather than using a traditional
flipchart/pen, but also give the presenter the option to show the
textbox as and when required. The text box should also be empty of any
previous text entered.

The text box I have posted is identified as TextBox1 using Shyam
Pillais shape identifier add in
I dont get any error messages when i run the code from either the VBA
editor or powerpoint.
If I run the code from the VBA editor, any changes in the code have
taken place when I switch back to PowerPoint, but if I assign the code
to an action button on the slide it has no affect.

In summary what I want to happen is
A button on an index (Slide 1) initialises the text box on slide 2 by
making it invisble and removing all text
A button on slide 2 to display the text box and allow the user to enter
text on screen
A 2nd button on Slide 2 would be nice to export the text to a text file
or a word document to record what has been input. Much like the meeting
minder facility but more controllable in terms of appearance and page
specific.

Hope that makes sense

Ian
 
E

easy

Steve
I had the same thought and I have attached the text box to a form and
it works great, it even clears itself when it is re launched
I have even manged to get it to print the form using:

UserFrom.print,

Which unsurprisingly prints the form along with the print button.
Can I get the print button just to print the contents of the text box?
What is the command to close the form from a button?
What about saving the contents of the text box ?

Even though I know nothing about it I love this VBA and the potential
it gives me. I need to get some training somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top