Re: IDE or Editor for VBS?
- From: "Miyahn" <HQF03250@xxxxxxxxxxx>
- Date: Mon, 11 Apr 2005 20:18:22 +0900
"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
.
- Follow-Ups:
- Re: IDE or Editor for VBS? --Intellisense support
- From: Rafael T
- Re: IDE or Editor for VBS?
- From: Rafael T
- Re: IDE or Editor for VBS? --Intellisense support
- References:
- IDE or Editor for VBS?
- From: simon crowder
- Re: IDE or Editor for VBS?
- From: simon crowder
- Re: IDE or Editor for VBS?
- From: Miyahn
- Re: IDE or Editor for VBS?
- From: Rafael T
- IDE or Editor for VBS?
- Prev by Date: Bring a window to front
- Next by Date: Edit user profile with script
- Previous by thread: Re: IDE or Editor for VBS?
- Next by thread: Re: IDE or Editor for VBS?
- Index(es):
Relevant Pages
|