LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default CellPointer (rectangle around selected cell) not visible

To make some data input sheets more user friendly, I created the possibility
for the user to choose whether he may select locked cells or not. To disable
the access of locked cells I wrote the following code :

Public Sub InputModeLock()

Application.ScreenUpdating = False

Dim BackSheet As String
Dim BackCell As String
Dim BackCellFound As Boolean
Dim StartCell As String

BackSheet = ActiveSheet.Name
BackCellFound = False
StartCell = ActiveCell.Address

If ActiveCell.Locked = True Then ' Just to direct the CellPointer to an
unlocked cell

Do While ActiveCell.Row 11
ActiveCell.Offset(-1, 0).Range("A1").Select
If ActiveCell.Locked = False Then
BackCell = ActiveCell.Address
BackCellFound = True
Exit Do
End If
Loop

If BackCellFound = False Then
Range(StartCell).Select
Do While ActiveCell.Row < 100
ActiveCell.Offset(1, 0).Range("A1").Select
If ActiveCell.Locked = False Then
BackCell = ActiveCell.Address
BackCellFound = True
Exit Do
End If
Loop
End If

Else

BackCellFound = True
BackCell = ActiveCell.Address

End If

ActiveSheet.Unprotect Password:="xxxx"
Range("A2502").Value = True
ActiveSheet.Shapes("InputLocked").Select
Selection.Delete
Sheets("Globals").Select
ActiveSheet.Unprotect Password:="xxxx"
Range("InputModeUnlocked").Select
Selection.Copy
Sheets(BackSheet).Select
ActiveSheet.Paste
If BackCellFound = True Then
Range(BackCell).Select
End If
ActiveSheet.EnableSelection = xlUnlockedCells
ActiveSheet.Protect Password:="xxxx"

End Sub

This works okay, but preparing the file for the user I run some code to
protect, hide, reformat ecetera etcetera. To put all sheets where appliccable
in locked position, I call the InputModeLock routine. Which again works
perfectly. The only thing is that my CellPointer (the rectangle around a
selected cell) is gone. In the upper left corner of my screen, where the
selected cell address or name is displayed, I can see that I can select the
unlocked cells, but I do not see the CellPointer. The moment I input anything
in an unlocked cell, which is possible, then the CellPointer is back
immediately.

The code calling InputModeLock routine is :

Sheets("Sheet x").Select
Rows("500:5000").Select
Selection.EntireRow.Hidden = True
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayGridlines = False
If Range("A2502").Value = False Then
Call InputModeLock
End If

Anyone any clue?

Thanks in advance,

Henk



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
change cellpointer joelberns Excel Discussion (Misc queries) 1 March 24th 08 09:38 PM
Ensuring Selected Cell is Visible on Screen ZipCurs Excel Programming 7 March 23rd 08 06:47 PM
Selected cells not visible LAUR Excel Discussion (Misc queries) 1 May 15th 06 07:45 PM
I have charts that are only visible when selected, how do I fix? Tony Parks Charts and Charting in Excel 2 May 12th 06 12:07 PM
scroll window to display selected cell in visible area? Kate Excel Programming 5 January 3rd 06 03:38 PM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"