The scenario indicates everything works fine from within
an IDE or other programmed environment making a call to
Excel, but fails when Excel is responsible for the
execution. I don't have anything specific, but... I've
done some of these and there is a trust issue that
complicates development where Excel does execution from a
macro. It may be tied to that. Assuming you want a non-
specific instance created, I can't think of a work around
off the top of my head. Hope this is a direction you can
use...
E.
-----Original Message-----
Hello,
I have a feeling that this one is going to be difficult
to solve but here it
goes:
I have a form in built in a .Net DLL that uses the Rich
Text Box from the
1.1 framework. When I run the form from a .Net
application there are no
problems. When I run the form from a VB6 application
there are no problems.
However, if I run the from from an Excel macro, I get a
strange problem
where the property for "SelectedFont" is always null no
matter what you set
the font to (not just in situations where the selected
text contains
multiple fonts).
I have attached a sample VS.Net solution to demonstrate
the problem. If you
set the startup project to the WinApp program and run it,
it will work
properly. If you set the startup project to the RTBTest
DLL and set the
project to launch the program "VB WinApp.exe" included
with that project it
will run properly (press the button on the form to bring
up the .Net form
with the RTB).
If you set the startup project to the RTBTest DLL and set
the project to
launch Excel with a command line argument of the included
"TestWorksheet.xls" it will lauch a workbook that has a
single button on it
to press to get to the .Net form in question. However, on
this form you will
see that the RTB SelectedFont property is always null
regardless of what is
selected.
Can you please tell me why this is and what I can do to
get it to work
properly?
Kind regards,
Bryan