View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default excel vba problem - function calls from cells

internerdj,

My guess is that the ones that work aren't functions, but are subs, and the
one that doesn't work is a function. Functions can only return a value to
the cell that contains the function call - all other code acting on other
cells, filtering, etc. is ignored, though you can step through the code
fine.

HTH,
Bernie
MS Excel MVP

"internerdj " wrote in message
...
I have a vba function that I'm calling from a cell. It is supposed to
unhide a sheet copy some information to that sheet, do an advanced
filter, and fill some cells with a formula to count the number of
occurances of each value. I have some autofilters on my sheet and a
cell that changes when a filter is done. When I load the data into my
sheet the function works. However when a filter is performed it
doesn't run any of the commands in the function. I can trace it
walking through the commands, but it does not perform any of them.

I have another function that performs with the same result. I have 12
other functions that work just fine and are called in the exact same
manner and work just fine all the time.

Anyone know what could be going on?


---
Message posted from http://www.ExcelForum.com/