How to inactivate cells?

prshnthvn

New Member
Joined
Jan 23, 2010
Messages
30
Hello All,

I would like to know how to inactivate all cells except for the selected range of cells? Not just protecting the cells, i want them to be inactive.

Thanks in advance,
Regards,
Prashanth
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi

What do you mean by 'inactive'? When you protect your sheet you have the option of not allowing users to even select locked cells in the list of options. I think that feature has been present since XL2000...
 
Upvote 0
Is this what you mean?

Code:
Sub test()
With ActiveSheet
    .ScrollArea = Selection.Address
End With
End Sub
 
Upvote 0
Sorry, I was not clear before. I want only a range of cells to be visible in the sheet. I don't want other cell to be visible.

Thanks & Regards,
Prashanth
 
Upvote 0
Ah ok, that would probably be best done by hiding columns and rows. Lets say al you want to see if A1:Z100
Highlight all rows from row 101, right-click > hide.
Highlight all columns from column AA, right-click > hide.
 
Upvote 0
Try

Code:
Sub test()
With ActiveSheet
    .Columns("F:IV").Hidden = True
    .Rows("10:65536").Hidden = True
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,554
Members
448,970
Latest member
kennimack

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