View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default using named ranges in macros

Please ignore; I've answered my own question.

Thanks!
--
Brevity is the soul of wit.


"Dave F" wrote:

I have the following macro code which I recorded with the macro recorder:

Sub TCAPSfcst()
' Hides rows 85:120
' Hides columns AM:CP
' Freezes window at J4
Cells.Select
Range("B1").Activate
Selection.EntireRow.Hidden = False
Selection.EntireColumn.Hidden = False
Rows("85:120").Select
Selection.EntireRow.Hidden = True
Columns("AM:CP").Select
Selection.EntireColumn.Hidden = True
Range("J4").Select
ActiveWindow.FreezePanes = False
ActiveWindow.FreezePanes = True

I need to change the cell/range references in this code to named ranges.
What is the syntax for named ranges in VBA? I've already created the named
ranges.

Thanks,

Dave

--
Brevity is the soul of wit.