Solved by the MSDN guys:
http://social.msdn.microsoft.com/For...-a38433da5a19/...
User Profile
Collapse
-
Type mismatch error MyFunc(arg1), MyFunc is out-of-proc COM and arg1 is IUnknown**
Hello
I am trying to interface with a legacy MFC out-of-proc COM server. Some by ref arguments work fine (like long*) the other (IUnknown**) give me a DISP_E_TYPEMISM ATCH, no matter what I try. Example:
COM server:
VB.NET:Code:long CNAVDocViewer::getMainWindowHandle(long* _plhWnd)
...Code:Dim o As Object = CreateObject("NAVDocViewer.NAVDocViewer") Dim h As Integer = Integer.MinValue -
I replaced reference to "Microsoft.Offi ce.Interop.Exce l.CellFormat.Nu mberFormat" to "Microsoft.Offi ce.Interop.Exce l.CellFormat.Nu mberFormatLocal " and it solved the problem.Leave a comment:
-
Problem with excel.Range.NumberFormat
I am converting a VB6 app to VB.NET
The VB6 starts Excel to create a report.On several cells, the VB6 code does this:
rg._Default(1, 3).NumberFormat = "0.0000"
rg._Default(1, 3) = 140.95
When I open the report with excel, and right click on the cell, I can see that a "Personnali zed format" has been added and is "0.0000". Works fine.
However the same code in...
No activity results to display
Show More
Leave a comment: