Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To update several cells by one function call?

Status
Not open for further replies.

lsofman

Programmer
Sep 14, 2007
1
US
Dear friends,

Is it possible to update more than one cell in Excel spreadsheet by using one call to VBA function?
Specifically: I put in one cell (e.g. A1) string "=F(2)", where F is VBA macro (function) I defined. It works fine if I am going to update the cell A1 only. But it does not work if I include into the function F statement like
cells(3,5)=1 (i.e. try to update another cell).

Do you know is it possible at all to update more than one cell in Excel spreadsheet by using one call to VBA function?

Thank you.
 
AFAIK an UDF can't update any foreign cell ...

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Use Application.Volatile in your UDFs? Turn calculation to automatic?

Regards,
Zack Barresse

Simplicity is the ultimate sophistication. What is a MS MVP? PODA
- Leonardo da Vinci
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top