View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
J. Caplan J. Caplan is offline
external usenet poster
 
Posts: 1
Default Trouble updating a cell's text that has a formula in it through VB

I have a multiple cells in an Excel Spreadsheet that all call a user defined
function. There is a case where a different action (calling VBA code in
Excel) that gets data back and needs to update the text of those cells that
have the formula.

I have the data that need in the array and I know the cells that need their
text updated. I can not use Range.Text since that is readonly. If I call
Range.Value = values(i) that updates the text of the cell, but it also wipes
out the formula. Is there a way to programmatically update the text of a
cell without wiping out the formula? When a formula produces an error, it
puts text in the cell without wiping out the formula, so it must be possible.