Re: IDE or Editor for VBS?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Rafael T" wrote in message news:uFmeCojPFHA.3076@xxxxxxxxxxxxxxxxxxxx
> I didn't know that MS script editor existed before, but by seeing this post
> it got my curiosity.
>
> - You said you use Lotus notes objects, ie, etc. How can I add those and
> others?

You can't add the references on MSE(MS script editor).
You can add the references for various type-libraries on VBE.

Try my script and select 'Tools'->'References' on VBE menu.
(I'm not sure English menu expression)
Open Object Browser(F2), select library, take a look classes and
members list box.

To add the references by code, change my script as the following.
---
With xlApp.VBE
On Error Resume Next
With .ActiveVBProject.References
'Reference for Microsoft Internet Controls
.AddFromGuid "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}",0, 0
'Reference for Lotus Notes Automation Classes
.AddFromGuid "{1CF542E0-D988-11CF-B485-00805F98FACE}", 0, 0
---

> - How do I use early binding or late binding to call intellisense?

To use early binding, declare object variables using 'As' clause.
Note:
VBS does not support 'As' clause, so you must remove that
before execution.
'As' clauses are only for editing.

To use late binding, declare object variables without 'As' clause.
(or do not declare.)

Sample sub procedure, 'As' clauses are commented out.

Sub Test()
Dim IE 'As InternetExplorer
Dim nSS 'As NOTESSESSION
Dim nDb 'As NOTESDATABASE
Set IE = CreateObject("Internetexplorer.Application")
IE.VISIBLE = True
IE.NAVIGATE "About:Blank"
Set nSS = CreateObject("NOTES.NOTESSESSION")
Set nDb = nSS.CURRENTDATABASE
MsgBox nDb.FILENAME
Set nDb = Nothing: Set nSS = Nothing: Set IE = Nothing
End Sub

--
Miyahn (Masataka Miyashita) JPN
Microsoft MVP for Microsoft Office - Excel(Jan 2005 - Dec 2005)
HQF03250@xxxxxxxxxxx

.



Relevant Pages

  • Re: IDE or Editor for VBS? --Intellisense support
    ... I'm using early binding. ... > You can't add the references on MSE(MS script editor). ... > You can add the references for various type-libraries on VBE. ... declare object variables using 'As' clause. ...
    (microsoft.public.scripting.vbscript)
  • Re: IDE or Editor for VBS?
    ... > You can't add the references on MSE. ... >> - How do I use early binding or late binding to call intellisense? ... declare object variables using 'As' clause. ... declare object variables without 'As' clause. ...
    (microsoft.public.scripting.vbscript)
  • Re: oracle indexes
    ... Sometimes I will do a query with a where clause that just references ... queries referencing a or a,b or a, b,c. ...
    (comp.databases.oracle.misc)
  • Re: oracle indexes
    ... Sometimes I will do a query with a where clause that just references ... queries referencing a or a,b or a, b,c.  But, I am not as familiar ...
    (comp.databases.oracle.misc)
  • Re: Send E-Mail
    ... Scroll down until ... >you find the Lotus Notes object library and check it. ... scrolling down the references one by one looking for any for which the ...
    (microsoft.public.access.modulesdaovba)