Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #3   Report Post  
Posted to microsoft.public.excel.programming
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/



Reply
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
what could cause numbers to appear as row names and column names lexie61 Excel Worksheet Functions 3 February 6th 10 02:29 AM
Automatic Page Number and Sheet Names? Derrick Excel Discussion (Misc queries) 2 June 19th 09 09:49 PM
Macro NOT completing Jim A[_2_] Excel Discussion (Misc queries) 4 January 27th 09 08:35 PM
Automatic File Names chrismusic79 Excel Discussion (Misc queries) 2 August 29th 06 01:22 PM
sorting names alphabetically when names may start with numbers John Smith Excel Discussion (Misc queries) 3 May 11th 05 08:06 PM


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

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

About Us

"It's about Microsoft Excel"