svikram86

Accessing Arcobjects from Excel

Discussion created by svikram86 on Mar 6, 2012
Latest reply on Mar 7, 2012 by Neil
Hello ,

I am trying to access arcobjects from excel vba . But I am getting an error . Below is my script . i have added all the references relating to ESRI .

Dim pworkspacefactory As IWorkspaceFactory2
Set pworkspacefactory = New FileGDBWorkspaceFactory
Dim pworkspace As IWorkspace
Dim s As String
s = "H:\\SPSD\\SPSD1.gdb"
If pworkspacefactory.IsWorkspace(s) Then
Set pworkspace = pworkspacefactory.OpenFromFile(s, 0) getting error here (Run-time error '-2147220952 (80040228)')
MsgBox pworkspace.PathName


I have another question as well .. Can we pass parameters to Arcmap if we open it through a batch file

Please help me

Outcomes