Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C# Excel AddIn

0 views
Skip to first unread message

Jo

unread,
Feb 11, 2003, 9:34:11 AM2/11/03
to
Hi,
I have written an Excel AddIn, using C#. If anyone could
help with the following I would be very grateful...

1. I am having problems using the
Application.CommonAppDataPath property from within my
addin dll, which maybe because Excel is not a dot net
app. Is there any way of retrieving the equivalent
WITHOUT using unmanaged code ???

2. I want to allow users to select ranges in worksheets
from the .NET Windows.Form in the addin. I don't think I
can use the standard Excel range selection control, so
instead I hide the .NET form and show the bullt in Excel
dialog for defining ranges. This works ok, however in the
process, focus moves to another application. I can set
the focus back to excel but get a flicker as a result.
Does anyone know of a better way of performing this common
task.

Many thanks for any suggestions

Jo

Nicholas Paldino [.NET/C# MVP]

unread,
Apr 9, 2003, 3:05:36 PM4/9/03
to
Jo,

As for the CommonAppDataPath property, I definitely wouldn't depend on
it in Excel, because as you said, it is an unmanged app. What are you using
the CommonAppDataPath for?

Also, as for the dialog, the problem arises because you can't correctly
set the parent window for your form in Excel. You might be able to change
this, because you can override the CreateParams property on your form so
that you can set the Parent property to the handle of the currently active
window (in this case, Excel).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- nicholas...@exisconsulting.com

"Jo" <jo2...@hotmail.com> wrote in message
news:045301c2d1da$a47c4b00$a401...@phx.gbl...

0 new messages