I`m trying to follow the book Learning MS VBA, I`m currently up to page 564,
Linking Microstation Elements to Database Records.
I`m not sure if the book is missing something
i.e. certain steps to be followed first or based on what has already been learnt I should automatically know where I have gone wrong?
Anyway I get the following error.
Compile error:
Expected user-defined type, not project
After running the following code
Function CreateDatabaseLink(Mslink As Long, _
Entity As Long, _
LinkType As MsdDatabaseLinkage, _
IsInformation As Boolean, _
DisplayableAttributeType As Long) As DatabaseLink
End Function
Sub DatabaseLinkA()
Dim myElem As Element
Dim myLink As DatabaseLink
Set myElem = CommandState.GetLocatedElement(True)
Set myLink = CreateDatabaseLink(1, 1, msdDatabaseLinkageOleDb, _
True, 0)
myElem.AddDatabaseLink myLink
myElem.Rewrite
End Sub
I know a similar problem has been answered previously regarding page 564 (Learning MS VBA) however I was unable to relate it to my error message.
Any ideas?