Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to refer to the value of a cell containing a VBA function?

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rank Function: Refer to more than one range Gary T Excel Worksheet Functions 4 September 23rd 08 06:10 PM
How do I refer to the results of a function in a cell not the form James Lucero[_2_] Excel Worksheet Functions 2 April 28th 08 10:10 PM
Refer to selected cell in custom function Snowsride Excel Programming 5 February 9th 05 08:35 PM
Refer to the cell in which a function is entered. Rob Excel Programming 2 April 27th 04 02:22 PM
How to ensure function does not refer to cells outside of workbook? richardbok[_2_] Excel Programming 1 February 29th 04 08:56 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"