ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,832
- Office Version
- 2007
- Platform
- Windows
Hi,
I have the code in use shown below.
Can you advise what ive missed please as when i select No the code still runs as opposed to exit.
Yes should continut but No should exit
I have the code in use shown below.
Can you advise what ive missed please as when i select No the code still runs as opposed to exit.
Yes should continut but No should exit
Code:
Private Sub CommandButton1_Click()MsgBox "Did You Select The Vehicle?", vbYesNo + vbInformation, "Vehicle Selection Checker"
If vbYes Then
Sheets("Sheet1").Range("P6:U6").Copy Sheets("Sheet1").Range("E6")
Sheets("Sheet1").Range("P7").Copy Sheets("Sheet1").Range("E7")
Sheets("Sheet1").Range("E6:J6").Copy Sheets("DR SITE").Range("E6")
Sheets("Sheet1").Range("E7").Copy Sheets("DR SITE").Range("E7")
Sheets("Sheet1").Range("E6:J6").Copy Sheets("EBAY").Range("E6")
Sheets("Sheet1").Range("E7").Copy Sheets("EBAY").Range("E7")
Sheets("DR SITE").Range("E7").Font.Color = vbWhite
Sheets("DR SITE").Range("E7").Borders.LineStyle = xlNone
Sheets("EBAY").Range("E7").Font.Color = vbWhite
Sheets("EBAY").Range("E7").Borders.LineStyle = xlNone
Sheets("DR SITE").Activate
ActiveSheet.Range("E7").Select
Sheets("EBAY").Activate
ActiveSheet.Range("E7").Select
Sheets("Sheet1").Activate
ActiveSheet.Range("P6").Select
ActiveWorkbook.Save
End If
End Sub