Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Object Required: WScript

Object Required: WScript

Scheduled Pinned Locked Moved Visual Basic
linuxtoolshelptutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anoop Brijmohun
    wrote on last edited by
    #1

    Hi Guys, not sure if im in the right forum but this is the error i am getting in my script. i have googled and tried many things but to no avail.... the error: "Object Required: WScript" the code:

    dim wshShell ,Wscript
    set WshShell = CreateObject("WScript.Shell")

    while StockCode <>""
    Wscript.Sleep 1000
    wend

    the error fails on Wscript.sleep command... any idea on how to solve this.... thanks in advance Anoop

    M 1 Reply Last reply
    0
    • A Anoop Brijmohun

      Hi Guys, not sure if im in the right forum but this is the error i am getting in my script. i have googled and tried many things but to no avail.... the error: "Object Required: WScript" the code:

      dim wshShell ,Wscript
      set WshShell = CreateObject("WScript.Shell")

      while StockCode <>""
      Wscript.Sleep 1000
      wend

      the error fails on Wscript.sleep command... any idea on how to solve this.... thanks in advance Anoop

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      You create WshShell in line 2 but never create Wscript!

      Never underestimate the power of human stupidity RAH

      A 1 Reply Last reply
      0
      • M Mycroft Holmes

        You create WshShell in line 2 but never create Wscript!

        Never underestimate the power of human stupidity RAH

        A Offline
        A Offline
        Anoop Brijmohun
        wrote on last edited by
        #3

        how do i do that? i.e. create the wscript? thanks

        N D 2 Replies Last reply
        0
        • A Anoop Brijmohun

          how do i do that? i.e. create the wscript? thanks

          N Offline
          N Offline
          Noctris
          wrote on last edited by
          #4

          The same as you did for wshscript.. but i'm guessing this is copy past. Brushing up on OOP could help a lot more ..

          Do Or Don't, there is no "try catch ex as exception end try"

          1 Reply Last reply
          0
          • A Anoop Brijmohun

            how do i do that? i.e. create the wscript? thanks

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            It's obvious you have no clue what you're doing. I suggest starting with the basics, here[^].

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups