Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Muaz Bashara   on Jan 15 In MS Office Category.

  
Question Answered By: Yvonne Watkins   on Jan 15

: What I'd like to do is separate out the reformatting code  into
: their own routines, then call them whilst passing  the name of
: the range  I'd like it to operate on. What I can't figure out
: is how to pass the named  Range to the new proceedure.

The Range() method can handle named ranges. Here's a lame
example.


Foo (Sheets("Accounts").Range("Zip"))


Private Sub Foo(MyRange As Range)

MyRange.Font.Bold = True

End Sub

Share: 

 
 
Didn't find what you were looking for? Find more on Passing Named Ranges Or get search suggestion and latest updates.


Tagged: