It is not a sin to be tempted, but it is sinful to allow oneself to be drawn away and to yield to the temptation.
So at the time when temptation arises is the moment to apply Romans 8:13--to mortify the deeds of the body through the Holy Spirit. And notice that it is only through the Holy Spirit that we can effectively do this.
This calls for a new attitude. We must recognize that we are personally responsible. We cannot escape our responsibility by saying, "Well, it is the Holy Spirit's job to take over, so I am not responsible."
The Holy Spirit will not and cannot work if our minds are not determined to hate sin and to refuse to fulfill what our evil natures urge us to do. It is not just a matter of feeling hatred for sin, but it's a determination of the will.
The mind is the seat of the will, and we must use our thinking capacity to choose that which is right and to refuse that which is wrong.
God assists even in our willing, or choosing, for Philippians 2:13 says, "It is God which worketh in you both to will and to do of his good pleasure."
But God will not bypass our wills. If we choose to do wrong, He will not force us to do right. Our wills must be in complete submission to Him.
The person who knows Jesus Christ as Saviour has "the mind of Christ" (1 Cor. 2:16). By God's Word, through the ministry of the Holy Spirit, we know what Jesus Christ would think about a given matter; therefore, as we seek to honor Him, we think the same way.
This is why we should not yield the members of our bodies as instruments of unrighteousness but should yield them to God as instruments of righteousness (Rom. 6:13).
"Blessed is the man that endureth temptation: for when he is tried, he shall receive the crown of life, which the Lord hath promised to them that love him" (James 1:12).