C
Corey
Code Section Purpose:
Copies a Cell value from sheet and places the value in specific cells in
another sheet(Enter - Exit).
Then Clears the Clipboard memory, incase no paste function occurs.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Other Code Precedes this code
Range("K2").Copy
Sheets("Enter - Exit").Select
If Range("I14").Value = "" Then ' <=========== Option 1
Range("I14").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Else
If Range("I16").Value = "" Then ' <========== Option 2
Range("I16").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Else
If Range("I18").Value = "" Then ' <========== Option 3
Range("I18").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Application.DisplayAlerts = True
Else ' <============================ Option 4
Application.DisplayAlerts = True
msgbox "Copy/Paste Not Required!!!"
' More Code follows this line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With above code, there is 4 options that can run.
If the option 1 in run i get No Error msg
If either Option 2-3 run i get an error msg but it does not give me the
otpion to Debug. (Run Time Error 424: Object Required)
The ONLY thing i have noticed is that the Copied Cell is not cleared with
the Options 2-3, although i have the code :
Application.CutCopyMode = False inserted to clear the clipboard.
Why is this so ?
How do i fix it?
Regards
Corey
Copies a Cell value from sheet and places the value in specific cells in
another sheet(Enter - Exit).
Then Clears the Clipboard memory, incase no paste function occurs.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Other Code Precedes this code
Range("K2").Copy
Sheets("Enter - Exit").Select
If Range("I14").Value = "" Then ' <=========== Option 1
Range("I14").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Else
If Range("I16").Value = "" Then ' <========== Option 2
Range("I16").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Else
If Range("I18").Value = "" Then ' <========== Option 3
Range("I18").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheet4.Select
Range("A1").Select
Application.DisplayAlerts = True
Else ' <============================ Option 4
Application.DisplayAlerts = True
msgbox "Copy/Paste Not Required!!!"
' More Code follows this line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With above code, there is 4 options that can run.
If the option 1 in run i get No Error msg
If either Option 2-3 run i get an error msg but it does not give me the
otpion to Debug. (Run Time Error 424: Object Required)
The ONLY thing i have noticed is that the Copied Cell is not cleared with
the Options 2-3, although i have the code :
Application.CutCopyMode = False inserted to clear the clipboard.
Why is this so ?
How do i fix it?
Regards
Corey