View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Automatic completing of names and ID numbers - Problem.. help

Here is a sub that should get you started. You should have a defined name
for myrange that is self adjusting when you add employees and it should be
for column B in your example. You also want the macro to copy the employee
name and id number to the new sheet.

Sub mynewsheets()
For Each c In Range("myrange")
On Error Resume Next
If Sheets.Name < c Then
Sheets.Add.Name = c
End If
Next c
End Sub

--
Don Guillett
SalesAid Software

"Lurch Kimded" wrote in message
...

How about this one for a first post - I am trying to code in VBA for
Excel 97 a program that will take from a list of staff (with payroll
numbers) on one sheet in a workbook the name and ID into the correct
cells in a pre-created signing on sheet which is in the same workbook.

I have managed to figure out (on paper) how to activate the default
sheet, copy and rename it and then delete it when I'm finished but
after that I'm stumped. Basically I have no idea how to get it to copy
the cells over, move down the list and then keep on going no matter how
long the list is on.

I've attached a copy of sheet I am working on (so you can see the
format of the signing on sheet mainly), any help would be massively
appreciated. This is my first real attempt at doing this sort of thing
but I have done programming before. So even just pointing me in the
direction of where to go (careful ;-) would be cool.

Thanks for any help.
Lurch Kimded <<


+----------------------------------------------------------------+
| Attachment filename: signon.xls |
|Download attachment:

http://www.excelforum.com/attachment.php?postid=369268|
+----------------------------------------------------------------+

------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/