including named range code
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

resolvedResolved · Medium Priority · Version 2007

replyReply Tue 6 Dec 2011, 18:15Delegate Rodolphe said...

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

For upcoming training course dates see: Pricing & availability

replyReply Wed 7 Dec 2011, 08:54Trainer Mark said...

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

 

Please browse our web site to find out more about
access vba london and other Microsoft training courses.

Vba tip:

Stop Display Alerts In Excel

When creating or deleting a Worksheet in Excel you don't want Excel to inform you "A file already exists....." Or "Do you want to save this file...".

To stop these alerts happening use the following line of code:

Application.DisplayAlerts = False

After the Create or Delete routine use:

Application.DisplayAlerts = True

View all VBA hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard