Saving a generated part number to a log in the next worksheet.

tespinosa

New Member
Joined
Apr 29, 2014
Messages
5
I have created a ID generator that will then need to be saved to a log in the next worksheet.

I have created two command buttons, one to clear the form and another to save it to the log. I can not place a command that will identify the next open cell in a specific column for the log worksheet.

Another thing I need to make sure is that the ID number is not duplicated so I would also like to code a command to feed back an error if the ID number generated is already in the log.

here is my code so far:

Private Sub CommandButton2_Click()

Range("C20").Select
Selection.Copy

Sheets("Part Number Log").Select

Range(LstRw).PasteSpecial
Selection.PasteSpecial Paste:=xlPasteValues



End Sub


Any help would be greatly appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top