The Type Mismatch errors don't seem to be happening in the demo project. I should also clarify it's only an issue in the IDE. It's never given that error or crashed while running, either from VB or compiled.
If I had to guess, the 'type mismatch' is related to the fact that OLEGuids.IPerPropertyBrowsingVB and OLEGuids.IPerPropertyBrowsing are both being used- and if it's me only... I'll look for something not explicitly typed to OLEGuids but I also have olelib.IPerPropertyBrowsing that has a different set of methods. However it's not in use anywhere and everything in your project is explicitly typed as OLEGuids.IPer.. so not sure how such a conflict would arise. Why these three all have a different set of methods is bothersome...
Code:Private Sub ReplaceIPPB(ByVal This As OLEGuids.IPerPropertyBrowsing) If VTableSubclassPPB Is Nothing Then Set VTableSubclassPPB = New VTableSubclass If VTableSubclassPPB.RefCount = 0 Then VTableSubclassPPB.Subclass ObjPtr(This), VTableIndexPPBGetDisplayString, VTAbleIndexPPBGetPredefinedValue, _ AddressOf IPPB_GetDisplayString, 0, _ Private Function IPPB_GetDisplayString(ByVal This As Object, ByVal DispID As Long, ByVal lpDisplayName As Long) As Long Dim ShadowIPerPropertyBrowsingVB As OLEGuids.IPerPropertyBrowsingVB [..] Set ShadowIPerPropertyBrowsingVB = This 'type mistmatch




Reply With Quote