View Single Post
  #3   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?

Many thanks and apologies for my late response.

I have had problems. When I am reasonably sure
of the issues, I will post a new thread, in view of
the likely time lapse.

The issues are not related to your code, but I
believe more related to the way in which I
then use the code.

Again many thanks.

Regards.

"Dick Kusleika" wrote in message
...
Stuart

In a standard module

Public bSelectTB As Boolean

Sub SelectTb()

bSelectTB = True
Sheet1.Shapes("Text Box 1").Select

End Sub

Assing SelectTb to the textbox and change this code to reflect the correct
sheet and textbox name. Then, in the sheet's module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If bSelectTB Then
Me.Shapes("Text Box 1").TopLeftCell.CheckSpelling
bSelectTB = False
End If

End Sub

Again change the textbox's name. This worked for me with limited testing,
but let me know if you have any problems.

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

"Stuart" wrote in message
...
User opens a book, containing a single sheet. Code in the
Workbook_Open Event runs and if certain conditions are
met then a TextBox created by the Drawing toolbar is
displayed and enabled for data entry.

User enters their data, and when they click a cell outside
the textbox (ie exit the textbox) CheckSpelling will
automatically run on just the textbox.

Having done so, user would be free to re-enter the
textbox, but again, CheckSpelling would run when they
exit.

An ActiveX textbox is fine, except that it doesn't offer the
bells and whistles features of Spell Checking.

Hope this makes sense.

Regards.


---
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: 26/07/2004






---
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: 26/07/2004