Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks a lot, I´m newer in VBA. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
INDIRECT formula | Excel Worksheet Functions | |||
indirect formula | Excel Worksheet Functions | |||
indirect formula | Excel Worksheet Functions | |||
indirect formula help | Excel Worksheet Functions | |||
indirect formula | Excel Worksheet Functions |