Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default C# Form exposed to Excel does not like CalculateAll (F9)

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a form made in Excel 2002 be converted into a fillable form? Paraclete Excel Discussion (Misc queries) 1 February 20th 07 09:20 PM
Base class members are not exposed in Excel using Web Service YoJ Excel Programming 0 January 29th 07 04:05 PM
Painting my kitchen exposed parts (including ceiling) David Smithz Excel Discussion (Misc queries) 2 March 4th 06 12:31 AM
Transfer data to form from Excel range upon loading of form. Rob Crawford Excel Programming 2 October 24th 05 03:59 PM
form in excel to be attached to the emails address in the form upon sumission Abdulkader Bhanpurawala via OfficeKB.com Excel Programming 6 July 10th 05 10:48 AM


All times are GMT +1. The time now is 04:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"