ReferenceStyle:=xlR1C1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi TWIMC

I want to set a Range object to the xlR1C1Address of the print area of the
active sheet

Dim rge as Range

Set rge = ActiveSheet.PageSetup.PrintArea

The problem is that the return of ActiveSheet.PageSetup.PrintArea is a
string and not an address object.

Therefore can someone tell me how I can set rge to print area by converting
the string into an address range?

TIA
KM
 
Kevin,
Try this:

Private Sub CommandButton1_Click()
Dim r As Range

With ActiveSheet
Set r = .Range(.PageSetup.PrintArea)
End With

'r.Select

End Sub

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top