MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Making unused cells unclickable


Posted by Phil on June 23, 2001 8:57 AM

Hi

I think i'm getting a pritty good system together in excel - the only problem i have now is making it look more like a stand alone system and less like excel.

One of the steps to get this would be if i could make all the cells that aren't used loked so that they cant be clicked on / into.

Any suggestions...?

+ if any of you guys/gals have some other tips for making it look more professional.


Cheers

Phil


Posted by Dax on June 23, 2001 9:30 AM


Phil,
Try this. It's a bit simple and you could make it much more elaborate but it's a start.

This code needs to be placed in the code module for the workbook.


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Set t = Intersect(Target, Sh.UsedRange)
If t Is Nothing Then Sh.Range("A1").Select
End Sub

HTH,
Dax.

Posted by Ben O. on June 23, 2001 1:15 PM

You could set the scroll area so that only the relevant portion of the spreadsheet is viewable.

Sheets("Sheet1").ScrollArea = "A1:AG34"

You have to put your scroll area code in the Auto_Open macro because Excel does not remember it when you close and open the worksheet.

You might have already thought of these things, but you could try hiding the gridlines, hiding the scroll bars, hiding the sheets tabs (you can let the user switch between worksheets with macro buttons instead), hiding the formula bar, hiding toolbars (even default toolbars like standard and formatting), or having Excel go into Full Screen mode when a user opens the spreadsheet.

For a lot of these things, like the formula bar and toolbars, be careful that you have macros to re-activate them when the workbook is closed, because they won't automatically reappear.

-Ben

Posted by steve w on June 24, 2001 9:22 AM

Hi phil this is going to require 2 steps. First lock all the cells you want unclickable and make sure the ones you want clickable are unlocked. Next right click on sheet tab and select view code. If the properties window is not open open it by selecting
view/properties window
Now in the enable selection box change it to 1-xlunlockedcells.
That should be it.
steve w