Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ENTER DATA - LOG ENTRIES ON SEPERATE SHEET (IN SAME BOOK)
Hello guys,
A little Help here...I can't figure it out. I have one sheet in my workbook called DATA. On the DATA sheet, I enter the Last Name in Cell C3, I enter the First Name in Cell C5, I enter the middle name in C7 and the Worker ID in W3. After these cells, I have a command button (Button 6), it is labeled: "ADD TO LOG". I have another sheet in the same workbook called LOG. On this sheet I would like to log each name I enter in the DATA sheet. The first person I enter starts on Row 3. The next person I enter would go in Row 4, and this would keep going.. For example...in the LOG sheet, the first column would have LAST, FIRST MIDDLE in column A; the second column on the LOG sheet would have the worker's ID. I want to be able to push the command button (button 6) and the DATA sheet, and automatically have the data put on the next row down in the LOG sheet. Can someone throw some CODE my way ???? I appreciate it guys. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ENTER DATA - LOG ENTRIES ON SEPERATE SHEET (IN SAME BOOK)
You say you have a commandbutton, but they are usually named like
CommandButton6. this represents the event (located in the sheet module) for such a commandbutton. If it is a button from the forms toolbar instead (which matches the name you cite), put the code in a general module and assign it to the button. Private Sub commandButton6_click() Dim sh as Worksheet, lastrow as Long set sh = Worksheets("Data") With worksheets("Log") lastrow = Cells(rows.count,1).End(xlup).row +1 if lastrow < 3 then lastrow = 3 .Cells(lastrow,1).Value = sh.Range("C3").Value & ", " & _ sh.Range("C5").Value & " " & sh.Range("C7").Value .Cells(lastrow,2).Value = sh.Range("W3").Value End with end Sub -- Regards, Tom Ogilvy "Bull" wrote: Hello guys, A little Help here...I can't figure it out. I have one sheet in my workbook called DATA. On the DATA sheet, I enter the Last Name in Cell C3, I enter the First Name in Cell C5, I enter the middle name in C7 and the Worker ID in W3. After these cells, I have a command button (Button 6), it is labeled: "ADD TO LOG". I have another sheet in the same workbook called LOG. On this sheet I would like to log each name I enter in the DATA sheet. The first person I enter starts on Row 3. The next person I enter would go in Row 4, and this would keep going.. For example...in the LOG sheet, the first column would have LAST, FIRST MIDDLE in column A; the second column on the LOG sheet would have the worker's ID. I want to be able to push the command button (button 6) and the DATA sheet, and automatically have the data put on the next row down in the LOG sheet. Can someone throw some CODE my way ???? I appreciate it guys. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ENTER DATA - LOG ENTRIES ON SEPERATE SHEET (IN SAME BOOK)
Tom, wow...where in the heck do you learn all this stuff...I think
your name is all over these forums...thanks alot. On Jan 29, 10:23 am, Tom Ogilvy wrote: You say you have a commandbutton, but they are usually named like CommandButton6. this represents the event (located in the sheet module) for such a commandbutton. If it is a button from the forms toolbar instead (which matches the name you cite), put the code in a general module and assign it to the button. Private Sub commandButton6_click() Dim sh as Worksheet, lastrow as Long set sh = Worksheets("Data") With worksheets("Log") lastrow = Cells(rows.count,1).End(xlup).row +1 if lastrow < 3 then lastrow = 3 .Cells(lastrow,1).Value = sh.Range("C3").Value & ", " & _ sh.Range("C5").Value & " " & sh.Range("C7").Value .Cells(lastrow,2).Value = sh.Range("W3").Value End with end Sub -- Regards, Tom Ogilvy "Bull" wrote: Hello guys, A little Help here...I can't figure it out. I have one sheet in my workbook called DATA. On the DATA sheet, I enter the Last Name in Cell C3, I enter the First Name in Cell C5, I enter the middle name in C7 and the Worker ID in W3. After these cells, I have a command button (Button 6), it is labeled: "ADD TO LOG". I have another sheet in the same workbook called LOG. On this sheet I would like to log each name I enter in the DATA sheet. The first person I enter starts on Row 3. The next person I enter would go in Row 4, and this would keep going.. For example...in the LOG sheet, the first column would have LAST, FIRST MIDDLE in column A; the second column on the LOG sheet would have the worker's ID. I want to be able to push the command button (button 6) and the DATA sheet, and automatically have the data put on the next row down in the LOG sheet. Can someone throw some CODE my way ???? I appreciate it guys.- Hide quoted text -- Show quoted text - |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ENTER DATA - LOG ENTRIES ON SEPERATE SHEET (IN SAME BOOK)
On Jan 29, 10:23 am, Tom Ogilvy
wrote: You say you have a commandbutton, but they are usually named like CommandButton6. this represents the event (located in the sheet module) for such a commandbutton. If it is a button from the forms toolbar instead (which matches the name you cite), put the code in a general module and assign it to the button. Private Sub commandButton6_click() Dim sh as Worksheet, lastrow as Long set sh = Worksheets("Data") With worksheets("Log") lastrow = Cells(rows.count,1).End(xlup).row +1 if lastrow < 3 then lastrow = 3 .Cells(lastrow,1).Value = sh.Range("C3").Value & ", " & _ sh.Range("C5").Value & " " & sh.Range("C7").Value .Cells(lastrow,2).Value = sh.Range("W3").Value End with end Sub -- Regards, Tom Ogilvy "Bull" wrote: Hello guys, A little Help here...I can't figure it out. I have one sheet in my workbook called DATA. On the DATA sheet, I enter the Last Name in Cell C3, I enter the First Name in Cell C5, I enter the middle name in C7 and the Worker ID in W3. After these cells, I have a command button (Button 6), it is labeled: "ADD TO LOG". I have another sheet in the same workbook called LOG. On this sheet I would like to log each name I enter in the DATA sheet. The first person I enter starts on Row 3. The next person I enter would go in Row 4, and this would keep going.. For example...in the LOG sheet, the first column would have LAST, FIRST MIDDLE in column A; the second column on the LOG sheet would have the worker's ID. I want to be able to push the command button (button 6) and the DATA sheet, and automatically have the data put on the next row down in the LOG sheet. Can someone throw some CODE my way ???? I appreciate it guys.- Hide quoted text - - Show quoted text - Tom. Thanks again..but how to I make the entry move to the next row down, so it keeps a running log. Go to next row if previous row in the sheet "LOG" is full? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
ENTER DATA - LOG ENTRIES ON SEPERATE SHEET (IN SAME BOOK)
On Jan 30, 11:23 am, "Bull" wrote:
On Jan 29, 10:23 am, Tom Ogilvy wrote: You say you have a commandbutton, but they are usually named like CommandButton6. this represents the event (located in the sheet module) for such a commandbutton. If it is a button from the forms toolbar instead (which matches the name you cite), put the code in a general module and assign it to the button. Private Sub commandButton6_click() Dim sh as Worksheet, lastrow as Long set sh = Worksheets("Data") With worksheets("Log") lastrow = Cells(rows.count,1).End(xlup).row +1 if lastrow < 3 then lastrow = 3 .Cells(lastrow,1).Value = sh.Range("C3").Value & ", " & _ sh.Range("C5").Value & " " & sh.Range("C7").Value .Cells(lastrow,2).Value = sh.Range("W3").Value End with end Sub -- Regards, Tom Ogilvy "Bull" wrote: Hello guys, A little Help here...I can't figure it out. I have one sheet in my workbook called DATA. On the DATA sheet, I enter the Last Name in Cell C3, I enter the First Name in Cell C5, I enter the middle name in C7 and the Worker ID in W3. After these cells, I have a command button (Button 6), it is labeled: "ADD TO LOG". I have another sheet in the same workbook called LOG. On this sheet I would like to log each name I enter in the DATA sheet. The first person I enter starts on Row 3. The next person I enter would go in Row 4, and this would keep going.. For example...in the LOG sheet, the first column would have LAST, FIRST MIDDLE in column A; the second column on the LOG sheet would have the worker's ID. I want to be able to push the command button (button 6) and the DATA sheet, and automatically have the data put on the next row down in the LOG sheet. Can someone throw some CODE my way ???? I appreciate it guys.- Hide quoted text - - Show quoted text - Tom. Thanks again..but how to I make the entry move to the next row down, so it keeps a running log. Go to next row if previous row in the sheet "LOG" is full? Thanks- Hide quoted text - - Show quoted text - Anyone??? How to make the entry move to the next row down, so it keeps a running log. Go to next row if previous row in the same sheet is full? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
flowing data to seperate sheet | Excel Discussion (Misc queries) | |||
Sort out data on seperate sheet | Excel Programming | |||
enter data on 1 sheet and make it enter on next avail row on 2nd s | Excel Discussion (Misc queries) | |||
Data copy from a seperate sheet to data sheet | Excel Programming | |||
Is it possible to export each row of data to a seperate work book | Excel Programming |