print run only when all cells completed

donny1shot

New Member
Joined
Mar 8, 2018
Messages
18
Hi all I am currently running the code below. However the bottom part runs before I am able to complete filling in the relevant cells so it prints the sheet to quickly. How can I stop this.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("C12").Value = "Yes" Then MsgBox prompt:="Please make SOP aware!", Title:="CAUTION!"
If (Range("F15").Value) > Range("C13").Value Then UserForm1.Show
    If (Range("F15").Value) < Range("C13").Value Then ActiveSheet.PrintOut
End Sub

Thanks in advance.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
(Range("F15").Value) > Range("C13").Value
if the line is true, then the form will show, and stop code until you close the form
once the form closes then if the opposite is true it prints....
If (Range("F15").Value) < Range("C13").Value Then ActiveSheet.PrintOut

if the top line is false , no form opens and then it prints.
(the 2 IFs are opposite of each other)
 
Upvote 0
As soon as I enter a value into (C13) it bypasses the first If runs the second and prints I need to be able to enter values into cells (C14 +15) first before that part of the code runs.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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