how are "dim as new" and "set" different? 
Author Message
 how are "dim as new" and "set" different?

How are the following two differnet? or are they different?

Dim myolapp As New Outlook.Application

vs.

dim myolapp
Set myOlApp = CreateObject("Outlook.Application")

Thanks in advance.



Mon, 19 Jan 2004 10:24:44 GMT  
 how are "dim as new" and "set" different?
If you declare the second as type object you have late binding.

Quote:
> How are the following two differnet? or are they different?

> Dim myolapp As New Outlook.Application

> vs.

> dim myolapp
> Set myOlApp = CreateObject("Outlook.Application")

> Thanks in advance.



Tue, 20 Jan 2004 02:38:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. *"*-.,._,.-*"* I"LL TRADE VISUAL C++ FOR VBASIC *"*-.,_,.-*"*

2. PROB with "dim as new ADODB...."

3. PROB with "dim as new ADODB...."

4. PROB with "dim as new ADODB...."

5. dynamically dim a variable ie dim "variable"&n

6. GetObject("","InternetExplorer.Application") fails in Excel VBA

7. SysCmd 603, "path","path"

8. Disabling "BACK"/"FORWARD" buttons

9. Loop print "VARIABLE", "VARIABLE"

10. DLL or something like "#"#ยค#"!"#

11. Disabling "BACK"/"FORWARD" buttons

12. CreateObject("Excel","//server"), MsgBox output

 

 
Powered by phpBB® Forum Software