LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA, UDFs and VSTO

Excel 2003, SP1, Windows XP Pro, SP1 Visual Studio 2003

Hello,


I have created a set of functions in C# that are called by UDFs in Excel
(VBA code below). Most of them work fine but one of them calcExpense fails
at seemingly random intervals:

Public objManaged As Object

Public Sub RegisterCallback(o As Object)
Set objManaged = o
End Sub

Public Function calcExpense(row As Integer, col As Integer, begcol As
Integer, begqtr As String, endqtr As String, begsal As Double) As Double
Application.Volatile
If (IsEmpty(row) Or IsEmpty(col) Or IsEmpty(begcol)) Then
Exit Function
End If
calcExpense = objManaged.calcExpense(row, col, begcol, begqtr, endqtr,
begsal)
End Function

It is called from a cell like so:
calcExpense(ROW(),COLUMN(),COLUMN($F14),$E14,$F14, $D14)

I used a 3rd party tool Cell Audit by cubiclesoft to trace in and it appears
that the intrinsic fucntions ROW and Column are failing before my code is
even called. Causing the VBA function to exit and the cell to be set to
#VALUE.

Whenever the code does actually pass into my C# code the function executes
correctly.


Any help would be appreciated.

Terence

 
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
Tool tip for the UDFs created using vsto se add-in. parmanand Excel Worksheet Functions 1 March 12th 07 03:42 PM
VSTO David12345 Excel Discussion (Misc queries) 2 December 27th 05 08:14 PM
'portable' UDFs??? whelanj[_7_] Excel Programming 1 July 9th 04 01:13 PM
Acrobat 6.0 and UDFs Mike Lee[_2_] Excel Programming 0 January 29th 04 04:07 PM
VSTO 2.0 No Name Excel Programming 1 December 8th 03 09:02 PM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"