Good VBA books?

G

Guest

Hello Everyone...

I have to present my work in a pilot next week on an interative training
program (on report writing) and need to figure out how to print a TextBox
(not the shape). Dr. Marcovitz offered some suggestions, but is out of the
office. Per his suggestion, I asked the question again yesterday, but
recieved no responses.

Does anyone have a suggestion on a book that might help me learn how to
speak the Visual Basics language? Im not familiar with programing and sort
of learning as I go along. I ordered Dr. Marcovitz's book, but it hasnt
arrived yet, and I need help now.

Perhaps there is a book out there that might help me finish this project
over the weekend so that it will be ready for next week.

Any suggestions on a book, or help with yesterdays question?

Thanks in advance...
 
S

Steve Rindsberg

Hello Everyone...

I have to present my work in a pilot next week on an interative training
program (on report writing) and need to figure out how to print a TextBox
(not the shape). Dr. Marcovitz offered some suggestions, but is out of the
office. Per his suggestion, I asked the question again yesterday, but
recieved no responses.


This'll give you a starting point:

Sub test()

Dim oOLETextBox As Shape
Dim oTextBox As Shape

' get a reference to the textbox; change its name to match what's
' on your slide:
Set oOLETextBox = ActivePresentation.Slides(1).Shapes("TextBox1")

' add a regular text box to the slide, put any text in it
' make it invisible if you like
' Get a reference to it here (again, change the name to match)
Set oTextBox = ActivePresentation.Slides(1).Shapes("Text Box 5")

' now set the text in the PPT textbox to match that in the OLE textbox:
oTextBox.TextFrame.TextRange.Text = oOLETextBox.OLEFormat.Object.Text

' make it visible if it wasn't before
oTextBox.Visible = msoTrue

' now it'll print when you send the slide to the printer

End Sub
 
G

Guest

Thank you...Im trying, but still no luck yet!

By chance, did you see my post from 4/21/2005 "Macro to print textbox?"? It
gives more detail and code I have so far. Im not sure....Maybe Im not puting
your suggestion in the right place?????
 
A

Austin Myers

Nikki,

Not enough information. Is your textbox on the slide or is it on a form?
Is the textbox a PowerPoint Textbox or is it a Windows (control) textbox?
Are you simply trying to print the contents of the textbox or are you
prining the form or slide?

Austin Myers
MS PowerPoint MVP Team
 
G

Guest

Thanks for responding!

The textbox is on a slide in an Interactive Training PPT on Report Writing.
During the slide show, the user writes there description in a TextBox (on
slide34), then at the end of the presentation, Id like the user to print out
a slide that has there name and the description they wrote (which is entered
in the textbox) on a printable slide.

Please see the following previous post:

I inserted an Active "TextBox" (on slide 34) from the Control Toolbar so
that the
user can enter a brief paragraph during the slideshow. Id like to print the
paragraph the user wrote on the printable slide. The "Textbox" on slide 34
is an "Active TextBox" (rather than a shape) inserted from the "Control
Toolbox".

Im guessing that I have to insert a macro for the Active "textbox", as well
as a
macro for the Printable slide. Ive tried the folllowing code, but cant seem
to get the "textbox" to show up on the printable slide! Any suggetions?

Thanks...

MACRO attached to textbox on slide 34:

Dim Report As String

Sub TextBox1_Change()
Report = TextBoxinput
End Sub

MACRO for printable slide:

Dim userName As String
Dim Report As String

Sub PrintablePage()
Dim printableSlide As Slide

Set printableSlide = ActivePresentation.Slides.Add(Index:=86, _
Layout:=ppLayoutText)
printableSlide.Shapes(1).TextFrame.TextRange.Text = _
userName & "'s" & " Description of Incident"
printableSlide.Shapes(2).TextFrame.TextRange.Text = _
Report
 
S

Steve Rindsberg

Thank you...Im trying, but still no luck yet!

By chance, did you see my post from 4/21/2005 "Macro to print textbox?"? It
gives more detail and code I have so far. Im not sure....Maybe Im not puting
your suggestion in the right place?????

It's hard to say, Nikki. Where'd you put it? Pop the code as it stands now back
in here and we'll go forth from there.

It'd help a lot if we could keep all of the posts about this project in one thread;
if you reply to previous messages rather than posting new ones, that'd be great.
Thanks.
 
G

Guest

Thanks for all your help, everything is working now!

And Ill remeber your suggestion about keeping posts all on one thread if I
have any further questions.

Thanks again...

Nikki
 

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