![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi We do not need to add reference to the vbruntime, when you add reference to the CollectionFactory.dll, the IDE will automatically reference the VBA. Here is the code goes which ran OK based on my test. [STAThread] static void Main(string[] args) { CollectionFactory.clsVBACollectionClass objVBACollection = new CollectionFactory.clsVBACollectionClass(); VBA.Collection col = objVBACollection.CreateVBACollection(); object m = System.Reflection.Missing.Value; object name ="Microsoft"; col.Add(ref name,ref m,ref m,ref m); object i = 1; Console.Write(col.Item(ref i)); } Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. |
#4
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |