View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default How to refer to the value of a cell containing a VBA function?

workbooks("book2.xls").worksheets("sheet2").range( "a2").value _
= workbooks("book1.xls").worksheets("sheet1").range( "a1").value

is one way.

if they're in the same workbook:

with workbooks("book1.xls")
.worksheets("sheet2").range("a2").value _
= .worksheets("sheet1").range("a1").value
end with



Bob at Great Waters wrote:

I have a VBA function in a cell of one worksheet and want to use the value in
a cell of another worksheet. I haven't been able to figure out how to do
that.

Bob


--

Dave Peterson