Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-21-2011, 02:33 PM
Formulayeti Formulayeti is offline Simple VBA macro error Windows 7 64bit Simple VBA macro error Office 2007
Novice
Simple VBA macro error
 
Join Date: Nov 2011
Posts: 1
Formulayeti is on a distinguished road
Default Simple VBA macro error

i have written some simple code in vba :


Code:
Dim numberCorrect As String
Dim UserName As Integer
Dim numberWrong As String
Sub YourName()
UserName = InputBox(Prompt:="Type Your Name")
MsgBox " Welcome to the Quiz " + UserName, vbApplicationModal, " Quiz"
End Sub
Sub Correct()
MsgBox " That is correct, move on " + UserName, vbApplicationModal, " Quiz"
numberCorrect = numberCorrect + 1
SlideShowWindows(1).View.Next
End Sub
Sub Wrong()
MsgBox " Sorry Thats the wrong answer " + UserName, vbApplicationModal, " Quiz"
numberWrong = numberWrong + 1
SlideShowWindows(1).View.Next
End Sub
Sub Start()
numberCorrect = 0
numberWrong = 0
YourName
SlideShowWindows(1).View.Next
End Sub
Sub Results()
MsgBox ("You Got " & numberCorrect & " out of " & numberWrong + numberCorrect & ", " & UserName), vbApplicationModal, " Quiz "
SlideShowWindows(1).View.Next
End Sub
When using either the YourName or Right or Wrong macros it doesnt skip a slide it just stays put!
can anyone help it would be much appreciated
Reply With Quote
 

Tags
macros, simple, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple VBA macro error Runtime Error 4120 in Word 2007 macro Frankwlc Word 5 11-28-2011 01:54 AM
Macro Error 5174 muster36 Word VBA 0 08-12-2011 03:34 AM
Simple or what? nebb Publisher 0 09-23-2010 07:00 AM
Simple template kieransymes Word 0 03-08-2010 02:13 AM
Simple macro undoable? garon5 Outlook 0 04-20-2007 10:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:08 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft