View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ian Bayly Ian Bayly is offline
external usenet poster
 
Posts: 1
Default Returning value of a cell containing a formula

This question shows how little I know of Excel.
I'm involved in a VB application running Excel in background
(Visible=false).
All I need to do is read and write values to certain cells.
No problem reading when the cell has a value, but when the cell has a
formula, I get a Type Mismatch error.
I moved a snip of my VB code into Excel VBA and get the same result when
running natively in Excel.

Here is my simple attempt:

Dim myRange As Range
Set myRange = Worksheets("HP - GST Sched").Cells(3, 5)
MsgBox myRange

Any help much appreciated

Ian B