【HELP】vba createobject不成功
一下我用C#写的测试代码:
using System;using System.Reflection;using System.Windows.Forms;[assembly: AssemblyKeyFile( "C:\\Documents and Settings\\Administrator\\My Documents\\Downloads\\SimpleCLRHost_demo\\HelloMsgBox.snk")]namespace Ranjeet.SimpleCLRHost{ public class HelloHostDemo { public void Hi() { MessageBox.Show("YOO HOO from the Managed World!", "And now for this message"); } }}
Public lngStatus As ObjectSub test() On Error GoTo an_error If lngStatus Is Nothing Then lngStatus = CreateObject("Ranjeet.SimpleCLRHost.HelloHostDemo") End If an_error:End Sub