View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike-hime Mike-hime is offline
external usenet poster
 
Posts: 14
Default Calling functions from Excel worksheets and the Find function in XL '97

Can anyone tell me what the limitations of calling public functions from an
Excel worksheets is?

I've picked up using UDFs as a method of conditional formatting (as Jake
Marx suggested to me in an earlier post,) but it seems they can't accomplish
everything I want them to do.

For instance, suppose my code looks like this:

=NOT(Findvar()) (<---The conditional formatting formula)


Private Function Findvar() as Boolean

Workbooks.open "F:\Database.xls"

Findvar = MsgBox("Test", vbOKCancel, "Test")


When data is entered into the cell (and oddly enough, sometimes when you
click next to it,) the msgbox is displayed and the cell's formating is
changed correctly according to the results, but Excel doesn't even attemp to
open the workbook. It seems many other things I can include in the function
won't be executed either. Any help with this would be much appreciated!



Also, there is no information on the VBA function .Find in my help files. If
someone could tell me about it's usage, mainly about what data type it
returns, I would appreciate that as well.

TIA
Mike-hime