excel vba
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 Access VBA Training and help » Excel vba

Excel vba

The UK's most regular instructor-led training courses.
Training information: microsoft access course · Access training · Microsoft Office VBA training

resolvedResolved · Low Priority · Version 2003

Excel vba

Nam has attended:
Access Introduction course
Access Intermediate course
Access VBA course
Access Advanced course

by - delegate Nam [2 posts] (2008 May 9 Fri, 16:47) replyReply

How do I do a count of the number of filled rows in a spreadsheet so that for e.g. I can write a loop to go through all of them

Access VBA 2 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003/XP 2008 Jul 10 Thu + 11 Fri Southwark 3 book now £475 £495
2003/XP 2008 Aug 7 Thu + 8 Fri Southwark 7 book now £345 £399
2003/XP 2008 Sep 4 Thu + 5 Fri Southwark 5 book now £450 £485
2003/XP 2008 Oct 20 Mon + 21 Tue Southwark 8 book now £275 £399
2003/XP 2008 Nov 6 Thu + 7 Fri Southwark 8 book now £275 £399
2003/XP 2008 Dec 4 Thu + 5 Fri Southwark 8 book now £275 £399
Full Schedule: See all 17 Access VBA course dates.
Bookings currently available until 5th November 2009.

RE: Excel vba

by - trainer Roy [16 posts] (2008 May 12 Mon, 11:59) replyReply

Nam,

Provided that your data is in a sold block (no blank rows), you can use CurrentRegion (equivalent to doing Ctrl-*).

Assume that you have named the first cell in your data as "Datastart", then try something like this:

Dim dataregion As Range 'the existing block of data
Dim recordcount As Integer

Worksheets("Orders").Activate 'need to do this before selecting
Range("DataStart").Select 'the first data cell
Set dataregion = ActiveCell.CurrentRegion
recordcount = dataregion.Rows.Count 'assuming no header row


/Roy


Related articles

· Quick Access Course: Creating a Customer Contact Database in 8 Simple Steps
· Quick Microsoft Access Course: Creating an Inventory Control Database in 8 Simple Steps
· Microsoft Access Mistakes to Avoid
· Quick MS Access Training: Creating Custom Database Tables in 12 Simple Steps
· The Benefits of Certified Microsoft Training in Access

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

Access tip:

Create calculated fields that work out your age

You can uset eh year function to work out the year from NOW function and then subtract it with your date of birth type field

Age=Year(Now( ))-Year([DoB])

View all Access hints and tips

Institute of IT Training - Accredited Training Provider Institute of IT Training - Accredited Training Provider Prodigy Platinum Learning Partner Microsoft Office Specialist Authorised Testing Centre

Microsoft Registered Partner
microsoft office
ms office project server

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