advanced excel training - changing range names using
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and Help » advanced excel training - Changing range names using VBA

advanced excel training - Changing range names using VBA

The UK's most regular instructor-led training courses.
Training information: advanced excel training · Excel course · VBA courses London

resolvedResolved · Low Priority · Version Standard

Changing range names using VBA

Alex has attended:
Excel VBA course

by - delegate Alex [3 posts] (2007 Oct 5 Fri, 10:58) replyReply

I have range name which is used as the rowsource in a userform.

I want to be able have the size of this range name be checked and changed when ever the form is called in order to ensure that only “live” rows are included in the list box selection. The code I have written checks the size of the range using the excel row and match functions to find the start and end rows and should then define the range name size using these limits:

Dim FirstCountryRow As String
Dim LastCountryRow As String

Set FirstCountryRow = Row("Startcountrylist")
Set LastCountryRow = FirstCountryRow + (Match("[Spare]", "FullCountryList", 0) - 2)

ActiveWorkbook = "CountryList"
ActiveWorkbook.Names.Add Name:="TempCountryList", RefersToR1C1:="=CountryList!R”&FirstCountryRow&”C1:R”&LastCountryRow&”C1"


However it’s not working and I’m having trouble debugging it so any help would be gratefully received.

Excel VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Sep 8 Mon + 9 Tue Bayswater 2 book now £495 £495
2003 2008 Sep 18 Thu + 19 Fri Bloomsbury 1 book now £495 £495
2003 2008 Sep 25 Thu + 26 Fri Southwark 3 book now £475 £495
2003 2008 Oct 6 Mon + 7 Tue Bayswater 4 book now £475 £485
2007 2008 Oct 13 Mon + 14 Tue Bayswater 3 book now £475 £495
2003 2008 Oct 23 Thu + 24 Fri Southwark 4 book now £475 £485
Full Schedule: See all 44 Excel VBA course dates.
Bookings currently available until 26th November 2009.

RE: Changing range names using VBA

by - trainer David gold contributer[391 posts] (2007 Oct 18 Thu, 14:06) replyReply

i suggest you contact the office to have one of our vba specialsists talk to you


Related articles

· Microsoft Excel Training: Essential for Today's Employees
· How to Create Better Excel Spreadsheets: Part Two
· Fun Things I've Done With Excel
· Compare Different MS Excel Training Methods
· Microsoft Excel Training - Numerical excellence for all

Excel tip:

Turn off AutoComplete in Excel

You may have noticed when typing into your spreadsheets that if you start to enter labels that begin with the same letters as a label that has been previously entered in the same spreadsheet, Excel will try and automatically complete the text for you. This feature is called AutoComplete.

If you find this feature more annoying than useful, you can turn it off by:

1. Going to Tools - Options.

2. Select the Edit tab.

3. Remove the tick from next to the "Enable AutoComplete for cell values" option.

4. Click OK.

View all Excel hints and tips

Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information
AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz