sammy2007
06-28-2008, 05:29 AM
hi, i kinda dont know how to word this but i have a problem with my command button and vb coding. The thing is i have an order system i created, which consist of an 'order' sheet and 'process orders' sheet. When an order is placed, i click on the command button named process which the first row in the 'order' sheet is automatically copied into the 'process orders' sheet and then deleted from the 'order' sheet (its suppose to do that lol). The thing is i need to construct the code so that the orders are processed (copied) one at a time by the click of the command button than all at once. Here is the code:
Worksheets("New Orders").Range("A2:G2").Copy Sheets("Processed orders").Range("A2")
Worksheets("New Orders").Range("A2:G2").ClearContents
Worksheets("New Orders").Range("A3:G3").Copy Sheets("Processed orders").Range("A3")
Worksheets("New Orders").Range("A3:G3").ClearContents
So my question is how can i construct a code that will allow me to process orders one by one? please help and sorry for the essay lol
p.s. i have attached the file in case anyone wants to test it or is confused lol
Worksheets("New Orders").Range("A2:G2").Copy Sheets("Processed orders").Range("A2")
Worksheets("New Orders").Range("A2:G2").ClearContents
Worksheets("New Orders").Range("A3:G3").Copy Sheets("Processed orders").Range("A3")
Worksheets("New Orders").Range("A3:G3").ClearContents
So my question is how can i construct a code that will allow me to process orders one by one? please help and sorry for the essay lol
p.s. i have attached the file in case anyone wants to test it or is confused lol