Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default indirect formula on VBA


I need to use indirect formula on VBA

with application.indirect doesn´t work, that property doen´st appears

myfunction
dim myRange as Range
myRange = Cells(2, 3).Address
value = myRange.Value -- doesn´t works!!!

any solution??? I´m desperate.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default indirect formula on VBA

dim myRange as Range
Set myRange = Cells(2, 3)
value = myRange.Value

Not a good idea to use value as a variable name.

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

wrote in message
ups.com...

I need to use indirect formula on VBA

with application.indirect doesn´t work, that property doen´st appears

myfunction
dim myRange as Range
myRange = Cells(2, 3).Address
value = myRange.Value -- doesn´t works!!!

any solution??? I´m desperate.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default indirect formula on VBA


Thanks a lot, I´m newer in VBA.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 225
Default indirect formula on VBA

dim myRange as Range
myRange = Cells(2, 3).Address


Since myRange is a Range, which is an Object type,
this should be:

Set myRange = Cells(2,3)

value = myRange.Value -- doesn´t works!!!


as Bob has pointed out, you can't use the reserved word
"value" as a variable, Try:

Dim myValue as Variant
myValue = myRange.Value

However, you could cut out myRange and shorten the
code to:

Dim myValue as Variant
myValue = Cells(2,3).Value

I'm not sure where the Indirect function comes in -
perhaps you could explain exactly what you're
trying to do.


Andrew Taylor



wrote:
I need to use indirect formula on VBA

with application.indirect doesn´t work, that property doen´st appears

myfunction
dim myRange as Range
myRange = Cells(2, 3).Address
value = myRange.Value -- doesn´t works!!!

any solution??? I´m desperate.

Thanks


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
INDIRECT formula Ken[_2_] Excel Worksheet Functions 12 August 11th 08 03:40 PM
indirect formula Confused_Euffy Excel Worksheet Functions 4 May 12th 07 12:58 PM
indirect formula sanmos Excel Worksheet Functions 2 January 11th 07 10:05 PM
indirect formula help ivory_kitten Excel Worksheet Functions 10 September 19th 06 04:44 AM
indirect formula Manos Excel Worksheet Functions 0 February 16th 05 01:17 PM


All times are GMT +1. The time now is 06:57 PM.

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

About Us

"It's about Microsoft Excel"