Here is a summary of the code snippets used in these tutorials. 

Some lines of example code may break over two lines on this page.  You should type them on one line in your program, or else use the underscore character (see below)
Copying and pasting code may be easier. Remember to make any necessary changes. 
 

Use a space, then the underscore character

msgBox("Hello")

msgBox("Hello" & userName)

userName = InputBox(prompt:="What is your name?", Title:="Input Name")

ActivePresentation.SlideShowWindow.View.GotoSlide 3

ActivePresentation.SlideShowWindow.View.Next

ActivePresentation.SlideShowWindow.View.Previous

ActivePresentation.SlideShowWindow.View.First

ActivePresentation.SlideShowWindow.View.Last

ActivePresentation.SlideShowWindow.View.Exit

 ActivePresentation.Slides(3).Shapes(4).Visible = False

To make it visible again, use:

ActivePresentation.Slides(3).Shapes(4).Visible = True

ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Paragraphs(1).Font.Color = RGB(255, 0, 0)

(RGB values can range from 0 to 255 - the first number is for Red, the second is for Green and the third is for Blue)

ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Paragraphs(1).Font.Size = 40

ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Paragraphs(1).Font.Bold = True

ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Paragraphs(1).Font.Italic = True

If userAge < 20 then msgBox("Cool... let's have some fun!") else _
       msgBox("Don't you think you're a bit old for this sort of thing!")

If condition-1 Then
statements

ElseIf condition-2 Then
elseifstatements ...

Else
elsestatements

End If

Notes: If/Then must be on the same line, Must finish with End If, ElseIf/Then must be on same line

Select case userAge

case <20

msgBox("Wow, you're really young")

case <40

msgBox ("It's about time you started to act your age")

case <60

msgBox("Wow!  That's really old!")

case else

msgBox("Isn't it about time you booked a plot?")

end Select

  • Loops:  Do... While

Do While userName=""

userName = InputBox(prompt:="Please type your name!", _ Title:="Input Name")

Loop

  • Loops:  For Next'

For Counter = 1 to 5

       Eat lolly

Next Counter

  • The following line will play a Beep sound

Beep