Private Sub CommandButton3_Click()
ActiveSheet.Unprotect ("as")
Application.ScreenUpdating = False
Application.EnableEvents = False
'Account number
Worksheets(2).Range("B1").Value = Worksheets("Quote").Range("D19").Value
'names
Worksheets(2).Range("B2").Value = Worksheets("Quote").Range("B5:D5").Value
'address
Worksheets(2).Range("B3").Value = Worksheets("Quote").Range("B6:D6").Value
Application.ScreenUpdating = True
Application.EnableEvents = True
ActiveSheet.Protect ("as")
Unload Me
End Sub
Good morning all, working on a little project and need a little help. Here is what Im looking to do, to create a small data base of account #'s, names, and address's on a seperate sheet.
1. search a column on another sheet - sheet2.range("A") - to see if the value in sheet("Quote").Range("D19") is listed.
2. If the Value is "not" listed then copy Worksheets("Quote").Range("as listed above").Value to Worksheets(2).Range("as listed above").Value to the next empty row.
3. If the searched value in D19 is listed, than have a messgebox state account # already in use.
Im trying to piece some code together so thought I would ask to save some time along the way. Thanks as always.
ActiveSheet.Unprotect ("as")
Application.ScreenUpdating = False
Application.EnableEvents = False
'Account number
Worksheets(2).Range("B1").Value = Worksheets("Quote").Range("D19").Value
'names
Worksheets(2).Range("B2").Value = Worksheets("Quote").Range("B5:D5").Value
'address
Worksheets(2).Range("B3").Value = Worksheets("Quote").Range("B6:D6").Value
Application.ScreenUpdating = True
Application.EnableEvents = True
ActiveSheet.Protect ("as")
Unload Me
End Sub
Good morning all, working on a little project and need a little help. Here is what Im looking to do, to create a small data base of account #'s, names, and address's on a seperate sheet.
1. search a column on another sheet - sheet2.range("A") - to see if the value in sheet("Quote").Range("D19") is listed.
2. If the Value is "not" listed then copy Worksheets("Quote").Range("as listed above").Value to Worksheets(2).Range("as listed above").Value to the next empty row.
3. If the searched value in D19 is listed, than have a messgebox state account # already in use.
Im trying to piece some code together so thought I would ask to save some time along the way. Thanks as always.