Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
commandbutton?
I am entering info into Excel Sheet1 A1, B1, C1, D1. I want to click a
button (Submit) to move info to Sheet2 A1, B1, C1, D1. After I click button I would like Sheet1 to be ready for new entries which when Submit is clicked again will be moved to next rows on Sheet2 (A2, B2, C2,D2). thanks Bobby |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
commandbutton?
Try this. It goes in the CommandButton code module, naturally.
"Bobbykm" wrote: I am entering info into Excel Sheet1 A1, B1, C1, D1. I want to click a button (Submit) to move info to Sheet2 A1, B1, C1, D1. After I click button I would like Sheet1 to be ready for new entries which when Submit is clicked again will be moved to next rows on Sheet2 (A2, B2, C2,D2). thanks Bobby |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
commandbutton?
I hit the post button too quick.
Sub CommandButton1_Click() lr2 = Worksheets("Sheet2").Cells(Rows.Count, 1).End(xlUp).Row Worksheets("Sheet1").Range("A1:D").Cut Worksheets("Sheet2").Range("A" & lr) CutCopyMode = False End Sub "Bobbykm" wrote: I am entering info into Excel Sheet1 A1, B1, C1, D1. I want to click a button (Submit) to move info to Sheet2 A1, B1, C1, D1. After I click button I would like Sheet1 to be ready for new entries which when Submit is clicked again will be moved to next rows on Sheet2 (A2, B2, C2,D2). thanks Bobby |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
commandbutton?
hi,
another way, without using cut and paste. Private Sub cb1_Click() Dim fr As Range Dim sr As Range Set sr = Sheet2.Range("A65536").End(xlUp).Offset(1, 0) Set fr = Range("A65536").End(xlUp) sr.Value = fr.Value sr.Offset(0, 1).Value = fr.Offset(0, 1).Value sr.Offset(0, 2).Value = fr.Offset(0, 2).Value sr.Offset(0, 3).Value = fr.Offset(0, 3).Value End Sub regards FSt1 "Bobbykm" wrote: I am entering info into Excel Sheet1 A1, B1, C1, D1. I want to click a button (Submit) to move info to Sheet2 A1, B1, C1, D1. After I click button I would like Sheet1 to be ready for new entries which when Submit is clicked again will be moved to next rows on Sheet2 (A2, B2, C2,D2). thanks Bobby |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Commandbutton | Excel Programming | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
Commandbutton | Excel Programming |