"DO Nothing"

rspalding

Active Member
Joined
Sep 4, 2009
Messages
282
Office Version
  1. 365
Platform
  1. Windows
I have code where i want to add make "E12:I12" the active cells but only if it is not the active cells. I'm thinking.

If Range ("E12:I12") .Select = active, then

"Do Nothing"

else Range ("E12:I12") .Select

end if

I tried it and the "do nothing" keeps causing a compile error.

Thanks for the help.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Why not just Range("E12:I12").Select?
 
Upvote 0
Richard,

I tried what you sent and it didn't get me to where my final goal was. After I save my workbook, E12:I12 is the active cell, it closes without asking to save changes. However, if I hit my print button, and then close my workbook, it askes my to save changes. The only change would be if E12:I12 was not the active cell. I'm trying to save 1 step as I'm doing this many times per day.

Robert
 
Upvote 0

Forum statistics

Threads
1,211,839
Messages
6,104,296
Members
447,901
Latest member
boy3hc2004

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