C# Form exposed to Excel does not like CalculateAll (F9)

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all

I have a very strange problem / bug here that I was wondering if
anybody had come across before.

(Using Visual C# Express 2008, .Net 3.5, Excel 2003
All public static functions are exposed (and working) in Excel via
ExcelDna)

In addition to the functionality I have got working, I have a Form
written in C# that is accessed via the CommandBar. This form takes an
input of a target cell, the value of which will depend upon the output
of one of my UDFs.

When the OK button is pressed the following occurs:
1) the various settings in the classes behind this functions are
changed one at a time by a set amount
2) the worksheet is recalculated
3) the new value in that target cell is recorded
4) reset the changed value, repeat 1) to 3) for all the settings and
output all the results elsewhere

Now comes the strange part: it all works fine as long as I have never
previously pressed F9 or Ctrl-Alt-F9. Pressing Shift-F9 has no impact:
the results are displayed as expected but if I have pressed F9 any
time prior during this session of Excel, then while it appears to work
the results show no changes to the target cell's values.

Is there any reason why pressing F9 prior to running this Form (and
thereby the functionality it uses in C#) should mean that I don't see
any change in results?

I am totally stuck on this one and would really appreciate any
guidance you can give.

Thanks a lot
Lloyd
.



Relevant Pages

  • Re: Strange Problems with SBS2k3 and Win95 Clients
    ... > We are experiencing a strange problem with a new install of SBS2k3. ... > the settings are like this, theu 95 clients can log on just fine. ...
    (microsoft.public.windows.server.sbs)
  • VS no longer saves keyboard settings (mappings)
    ... I have a strange problem with Visual Studio. ... for Edit.AutoCompleteWord in the "Default settings" applied to the Global ... restart it the same thing happens, I must use ALT+RIGHT ARROW or nothing. ...
    (microsoft.public.vsnet.ide)
  • really odd nokia 2600 divert problem
    ... Really strange problem. ... Voice divert for all calls appears to be ... enabled on the phone but if you go into settings, ... upgrade. ...
    (uk.telecom.mobile)
  • IMF - Junk E-mail Folder
    ... I have a strange problem. ... Messages are getting moved to the Junk E-mail folder even ... though they have a rating of 1. ... Even though both settings ...
    (microsoft.public.exchange.admin)