Custom Search validation of talk before publication Search for:
Hello happy to join you, and thank you for the great efforts you are making in this forum. I ask you to help me to modify this code in order to be able to cancel printing in the event that introduced to the starting number and the number eventually in cell G33 letters or symbols, or if you do not enter something as well as I want to be canceled print when you press the button ANNULER and Jazakm Allah reward. Private karlskoga Sub CommandButton1_Click karlskoga () On Error Resume Next Range ("BB1") = InputBox ("starting number") Range ("BB2") = InputBox ("No End") For CELP = Range ("BB1") To Range (" BB2 ") Range (" G33 ") = CELP 'ExecuteExcel4Macro" PRINT (1 ,,, 1 ,,,,,,,, 2 ,,, TRUE ,, FALSE) "Activewindow.SelectedSheets.PrintOut Copies: = 1 Next End Sub
Peace and mercy of God, my dear brother, try the following code: Private Sub CommandButton1_Click () On Error Resume Next Range ("BB1") = InputBox ("starting number") Range ("BB2") = InputBox ("No End") If Not IsNumeric (Range ("BB1")) Or Not IsNumeric (Range ("BB2")) Or Range ("BB1")> Range ("BB2") karlskoga Then GoTo 1 If MsgBox ("Confirm print", vbYesNo, "Order Confirmation ") = vbNo Then GoTo 1 For CELP = Range (" BB1 ") To Range (" BB2 ") Range (" G33 ") = CELP '' ExecuteExcel4Macro" PRINT (1 ,,, 1 ,,,,,,,, 2 ,,, TRUE ,, FALSE) "Activewindow.SelectedSheets.PrintOut Copies: = 1 Next 1: Range (" BB1: BB3 ") = Empty End Sub brother Ben attic
Back to Excel forum Alaksil
No comments:
Post a Comment