View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RichardSchollar RichardSchollar is offline
external usenet poster
 
Posts: 196
Default Putting a value in specifc Excel cell from Visual Basic

Hi Hgeron

You can't change the properties of a cell by using a function - you
need a sub procedure for that. Hence, you need something like a Sub
compute() to do this.

Best regards

Richard


hgeron wrote:
I have a function that is called, but I want to place intermediate numbers on
the Spreadsheet. This function fails with a # value error.

Function compute(x)
'read in some values
bw = Range("bw").Value
dp = Range("dp").Value

' fails here - I want to place the value of 23 in the dcap cell
Range("dcap").Value = 23
...following lines fail to execute

whats wrong?




--
hgeron