Help Please! =]

Author Message
isoda

  • Total Posts : 4
  • Scores: 0
  • Reward points : 0
  • Joined: 5/2/2009
  • Status: offline
Help Please! =] Monday, May 04, 2009 5:08 PM (permalink)
0
ync = MsgBox("Error code 4543: Passwords do not match", vbRetryCancel + vbQuestion, "Error")
If ync = vbRetry Then
msgbox("hi")
IfElse ync = vbCancel Then
Set objShell = CreateObject("WScript.Shell")
Set objWmi = GetObject("winmgmts:")
strWmiq = "select * from Win32_Process where name='notepad.exe'"
Set objQResult = objWmi.Execquery(strWmiq)
For Each objProcess In objQResult
intRet = objProcess.Terminate(1)
Next


I know there are TONS of errors don't beat me up please =] Im trying to make it so that if the user presses Retry, then the msgbox just closes. However, if you press Cancel, then the Msgbox closes AND ends a cmd.exe.
The current error I have is on line 4 char 23 that says : Expected end of statemen
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: Help Please! =] Tuesday, May 05, 2009 2:35 AM (permalink)
    0
    Well for one thing, change IfElse to ElseIf.
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9