View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_5_] Stuart[_5_] is offline
external usenet poster
 
Posts: 413
Default Can I do this with a TextBox?

Resolved, I think. It was a protection issue. Couldn't find a way to
enable just the textbox, so had to unprotect the sheet. Then it
worked. I'm now using:

Option Explicit
Public bSelectTB As Boolean

Sub SelectTb()
bSelectTB = True
Worksheets("Contract Master Fax").Unprotect _
Password:="abc"
Sheets("Contract Master Fax") _
.Shapes("Text Box 10").Select
End Sub

and

Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If bSelectTB Then
Me.Shapes("Text Box 10").TopLeftCell.CheckSpelling
Worksheets("Contract Master Fax").Protect _
Password:="abc"
Worksheets("Contract Master Fax").EnableSelection _
= xlUnlockedCells
bSelectTB = False
End If
End Sub

When the user clicks a cell in the sheet to exit the textbox, they can click
any
cell (since at that point the sheet is unprotected. As long as the
Selection_
Change event fires it should be okay and protected again.

3 questions, please:

1. The textbox is positioned over the range "C26:L65". When the user exits,
CheckSpelling runs on the textbox, then prompts to check the rest of the
sheet. Can this be turned off?
2. When the user initially clicks within the textbox, the cursor is not
visible.
It's only after a second click that it appears. Can it appear the first
time?
3. Can the tab key be enabled?

Many thanks again.

Regards.

"Dick Kusleika" wrote in message
...
Stuart wrote:
I will post a new thread, in view of
the likely time lapse.


Okay. If you like, you can feel free to reply to this thread. I keep a
close eye on threads I'm involved with.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.727 / Virus Database: 482 - Release Date: 27/07/2004