Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

including named range code

Forum home » Delegate support and help forum » Microsoft VBA Training and help » Including a named Range in the code

Including a named Range in the code

ResolvedVersion 2007

Rodolphe has attended:
Excel VBA Intro Intermediate course

Including a named Range in the code

Hi, how would I include a named range in vba code? Thanks

RE: Including a named Range in the code

Hello Rodolphe,

You can name a range in code as follows:
range("A1:B5").Name = "Name goes here"

and you can refer to these range names in code as follows:
Range("name goes here")

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Mark
Microsoft Office Specialist Trainer

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

VBA tip:

Empty The Clipboard with CutCopyMode

After each Copy/Paste operation in VBA, you should use the following line of code to empty the clipboard. This ensures that the computer memory doesn't overload:

ActiveSheet.Paste
Application.CutCopyMode = False

View all VBA hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.