VB 6 doesn't like "objProcess.Terminate()" ???

I have a small script called "terminate.vbs" that I run by double-clicking on it.
But, if I use it in MS-Visual Basic 6 it won't run or compile.  It doesn't like the line "objProcess.Terminate()".
The line also is colored red like a syntax error.  Why is that?

here's a clip - at the bottom is the line
---------------------------------------------
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = 'Notepad.exe'")
For Each objProcess in colProcessList
    objProcess.Terminate()
Next
------------------------------------------------
LVL 15
ZabagaRAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bruintjeCommented:
Hello ZabagaR,

take out the () it says to VB that it is expecting input

hope this helps a bit
bruintje

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ZabagaRAuthor Commented:
Thanks.  That worked.  I just don't understand why it would differ between the .vbs text-file version the same code under VB6.
I'd expect it to be the same...maybe without the "()" in both.

Did you know because you looked it up somewhere or just from experience?  I searched the internet for a bit, trying to find an explanation but never found one.
(which is why I ended up posting here).

Thanks again,
z
bruintjeCommented:
its the difference in syntax, this is something you see after walking through the vb dialects, vb, vbs and vba and luckily for us its vb.net now so more of the same little syntax differences to keep up with :-)

but i tested it first in Excel VBA before posting :)

thanks for the grade
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.