ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   range class problem (https://www.excelbanter.com/excel-programming/305742-re-range-class-problem.html)

Tom Ogilvy

range class problem
 
ActiveWorkbook.Names.Add Name:="CashFlow_Range_to_Parse_Begin", _
RefersTo:="=" & ActiveCell.Address(True,True,xlA1,True)

or

ActiveWorkbook.Names.Add Name:="CashFlow_Range_to_Parse_Begin", _
RefersToR1C1:="=" & ActiveCell.Address(True,True,xlR1C1,True)

or

ActiveCell.Name = "CashFlow_Range_to_Parse_Begin"

--
Regards,
Tom Ogilvy

"a" wrote in message
...
In number 2 below I'm passing in (from number 1) an R1C1 reference style

where an xlA1 style is needed (in the Range class). It doesn't work. I've
tried some different things, but I'm stumped and can't get this to work.

Any suggestions as to what combination will make VBA happy?

Thanks

--------------------------------------------------------------------------

------------------
'Add named range for CashFlow Range to "Web Query" workbook

1.) CashFlow_Range_to_Parse_Begin =

Application.ConvertFormula(Formula:=ActiveCell.Add ress,
fromReferenceStyle:=xlA1, toReferenceStyle:=xlR1C1) 'Set the value of
CashFlow_Range_to_Parse_Begin
ActiveWorkbook.Names.Add Name:="CashFlow_Range_to_Parse_Begin",

RefersToR1C1:="=" & CashFlow_Range_to_Parse_Begin


2.) rCashFlowSheet = Range(CashFlow_Range_to_Parse_Begin & ":" &

Notes_Range_to_Parse_Begin)




All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com