View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Pass contents of a cell to a macro

Sub Macro()
Dim s As String
Dim ss As String
Dim r As Range
ss = "Print_Range"
Set r = Range(ss)
s = r.Value
ActiveSheet.PageSetup.PrintArea = s
End Sub

This assumes that you have done two things already:

1. created the Name
2. put the range information into it

Have a good day
--
Gary's Student


"Steve" wrote:

I have a cell (called Print_Range). I want to call a macro to set the print
range to the contents of Print_Range e.g. $A$1:$E$55