Activate method of OLEObject failed

J

jose luis

Hi Forum

1. I implemented a worksheet with several Text Boxes from Controls
Toolbox.

2. To navigate around the Text Boxes , used a Bob Phillips
recommendation (thanks again Bob) that worked very well.


Code:
--------------------
Re: How to jump between TextBoxes

--------------------------------------------------------------------------------

Here is a way

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim bBackwards As Boolean


Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
Application.ScreenUpdating = False
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp)
'Excel 97 must select cell before activating another control.
If Application.Version < 9 Then Sheet1.Range("A1").Select
If bBackwards Then
TextBox3.Activate
Else
TextBox2.Activate
End If
Application.ScreenUpdating = True
End Select
End Sub
--------------------


3. My problems began when i "shared" the worksheet, everything works
well except when i tried to navigate using the enter, tab or arrows for
which i coded.
In that cases i receive the "run time error 1004" Activate method of
OLEObject class failed.

4. Could not see where the trouble araises because the "shared feature"
that prevents me from seeing the VBA code.

Could you give some directions or strategies on how to proceed to avoid
this error.

As allways thanks for your advice.

Regards

Jose Luis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top