PC Review


Reply
 
 
JPA
Guest
Posts: n/a
 
      1st May 2008

Have created a user form in Excel with several drop down combo boxes and a
command button which writes the choices ("Y" or "N") from the combo boxes to
a worksheet.

I would like to put a counter on the form showing the user how many entries
have been written to the worksheet. The theory for this is simple enuff -
simply count the number of rows of data on the worksheet and display it on
the form - but I haven't been able to figure this out!

Help!

JPA.

 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      1st May 2008
There are a few ways to do this. The simplest would be to have a variable
(type Long or Integer) within the form and then increment that variable
every time the user clicks the CommandButton. If the range on the worksheet
that has the list of choices is entirely surrounded by blank cells, you
could use the CurrentRegion.Cells.Count to return the number of cells that
have values.

Dim Counter As Long
Counter = ActiveSheet.Range("H6").CurrentRegion.Cells.Count


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)




"JPA" <(E-Mail Removed)> wrote in message
news:AAE96350-4C8B-4753-8CD3-(E-Mail Removed)...
>
> Have created a user form in Excel with several drop down combo boxes and a
> command button which writes the choices ("Y" or "N") from the combo boxes
> to
> a worksheet.
>
> I would like to put a counter on the form showing the user how many
> entries
> have been written to the worksheet. The theory for this is simple
> enuff -
> simply count the number of rows of data on the worksheet and display it on
> the form - but I haven't been able to figure this out!
>
> Help!
>
> JPA.
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hit counters Paul Smith Microsoft Frontpage 2 9th Oct 2005 11:47 PM
Counters Terri Microsoft Excel Programming 2 27th Sep 2004 08:23 PM
Hit Counters JCO Microsoft Frontpage 7 19th Apr 2004 05:25 AM
Hit counters =?Utf-8?B?RGF2ZQ==?= Microsoft Frontpage 4 8th Jan 2004 08:51 PM
counters tag Microsoft Excel Programming 0 14th Sep 2003 12:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:42 PM.