VBA and powerpoint

F

Fay Yocum

I bought David's book and I am trying to make something work using VBA.
There is the code

Sub AddStageI()
Dim newstuff As String

newstuff = InputBox("What is a sign of a Stage I pressure ulcer?")
If newstuff "" Then
With ActivePresentation.SlideShowWindow.View.Slide _
.Shapes(2).TextFrame.TextRange
.Text = .Text + Chr$(13) + newstuff
End With
End If

End Sub

The If newstuff line keeps redlettering me and telling me it is expecting
that it is expecting a Then or GoTo. I do have dyslexia and can't proof read
worth a darn, but I think Then = Then. Any ideas.

Thanks


Fay
 
D

David M. Marcovitz

Thanks Fay for buying my book. Steve and TAJ are almost right. You actually
want <> (that is a less than sign followed by a greater than sign) meaing not
equal. This is a misprint in the book, and you are the first to point it
out. I am a bit annoyed because I corrected this when the publisher left it
out of one of the drafts, but it obviously didn't make it into the final copy
of the book. You are doing something based on the nature walk example on
pages 81-82. You can find the correct code for this at my Web site under
Example 6-7:

http://www.loyola.edu/education/PowerfulPowerPoint/ExamplesByChapter/Chapter6/Example06-07.txt

I'll have to contact my publisher to get this corrected in the next
printing. Sorry for the inconvenience. By the way, the only other error I
know about is on page 128, and the correct version of the code for that is
also on the Web site.

--David

David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 
F

Fay Yocum

Thanks guys. David I know about publishing books, I have written 4 and have
self-published them. But the nice part was that I had an award winning
editor that kept me honest.

I am having fun with your book. Looking forward to creating some quizzes
with it in the near future.

I like the way you present the material.

Fay
 
D

David M. Marcovitz

Actually, the equal sign was a good idea, probably what I would have
suggested if I didn't have a little inside information.
--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/
 

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