ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatic completing of names and ID numbers - Problem.. help (https://www.excelbanter.com/excel-programming/283919-automatic-completing-names-id-numbers-problem-help.html)

Lurch Kimded

Automatic completing of names and ID numbers - Problem.. help
 

How about this one for a first post - I am trying to code in VBA fo
Excel 97 a program that will take from a list of staff (with payrol
numbers) on one sheet in a workbook the name and ID into the correc
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 defaul
sheet, copy and rename it and then delete it when I'm finished bu
after that I'm stumped. Basically I have no idea how to get it to cop
the cells over, move down the list and then keep on going no matter ho
long the list is on.

I've attached a copy of sheet I am working on (so you can see th
format of the signing on sheet mainly), any help would be massivel
appreciated. This is my first real attempt at doing this sort of thin
but I have done programming before. So even just pointing me in th
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


MSP77079[_3_]

Automatic completing of names and ID numbers - Problem.. help
 

Sub CreateTimeSheets()

Dim myRange As Range

Sheets("Staff_List").Select
Range("A1").Select
Set myRange = ActiveCell.CurrentRegion
LastRow = myRange.Cells(myRange.Cells.Count).Row

For i = 1 To LastRow

' put in here whatever it is you want to do with each name on your
list

Next i


End Sub


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


Don Guillett[_4_]

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/





All times are GMT +1. The time now is 08:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com