LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Cycle through a list (Part 2)

I have this code, I got from Jim R in this newsgroup, and
the the code works great (THANKS JIM) if I have 4 users
set up.

My problem is I don't always have 4 users involved in
these inputting sessions. When I set up the worksheet to
only have 2 or 3 users the last person that enters the
data ends up sending it to no one in particular.

Example----
2 users - 1)Pete 2)Tom

When Tom hits his calculate button the "CurrentName" range
changes to "Blank" and the the program returns and error
because it can't find a name to send the worksheet to the
next user.

I was hoping someone out here would have a neasy fix for
me.

***Code****

Sub UpdateName()
Dim CurrName As String
Dim CurrIdx As Integer
CurrName = Range("CurrentName").Value
If CurrName = "" Then
CurrIdx = 1
Else
On Error GoTo BadMatch
CurrIdx = Application.Match(CurrName, Range
("NameList"), False)
CurrIdx = CurrIdx + 1
If CurrIdx Range("NameList").Columns.Count Then
CurrIdx = 1
End If
End If
ResumeHe
Range("CurrentName").Value = Range("NameList").Cells
(CurrIdx).Value
Exit Sub
BadMatch:
CurrIdx = 1
Resume ResumeHere
End Sub

Any thoughts
TIA
Pete

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cycle through list and put data found in col a into col d april Excel Discussion (Misc queries) 6 February 18th 10 07:13 PM
How do I make a graph with 2-cycle X 3-cycle log-log graph paper? Charles A. Wilson Charts and Charting in Excel 1 December 17th 09 03:03 AM
Display part of list dependant on Validation list selection Jules73 Excel Worksheet Functions 0 August 12th 09 02:21 PM
How do I keep result from 1 iteration cycle to use in next cycle? sgl8akm Excel Discussion (Misc queries) 0 July 27th 06 08:28 PM
Cycle trhough a list of names Pete Excel Programming 3 December 19th 03 02:09 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"