Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default alternative to TextBox1.Activate


Hi Forum

Could you give a hand with the following:

1. Worksheet with several TextBoxes from Controls Toolbar

2. In order to jump between the TextBoxes used



Code:
--------------------
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Application.ScreenUpdating = False
Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp ''' These are the only keys we care about.
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp) ''' Determine if we need to move backwards.
If Application.Version < 9 Then Sheet1.Range("A1").Select ''' In Excel 97 we must select a cell before activating another control.
If bBackwards Then TextBox3.Activate
Else TextBox2.Activate ''' Activate the appropriate control based on key(s) pressed.
Application.ScreenUpdating = True
End Select
End Sub
--------------------


3. Worsheet runs well protected but when Shared generates a error
"Activate method of OLEObject failed"

4. Debugging the code, found the activate from the TextBox is where the
error occurs.
5 Turn on the "Trust Access to Visual basic Project" but the bug
remains.

6. Is there a way to "jump" to the next TextBox using a method allowed
in a shared environment?

All ideas welcome and appreciated.

Thanks

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=376409

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default alternative to TextBox1.Activate


Trying to found a solution I research that changing the textboxes to
simple cells I can use
Application.Goto Reference:=Sheets(1).Range("NameCell")

Nevertheless, I would like to find a way to keep the Textbox Look and
posibility of using their properties.

All ideas welcome

Thanks

Joe Louis :(

jose luis Wrote:
Hi Forum

Could you give a hand with the following:

1. Worksheet with several TextBoxes from Controls Toolbar

2. In order to jump between the TextBoxes used



Code:
--------------------
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)

Application.ScreenUpdating = False
Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp ''' These are the only keys we care about.
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp) ''' Determine if we need to move backwards.
If Application.Version < 9 Then Sheet1.Range("A1").Select ''' In Excel 97 we must select a cell before activating another control.
If bBackwards Then TextBox3.Activate
Else TextBox2.Activate ''' Activate the appropriate control based on key(s) pressed.
Application.ScreenUpdating = True
End Select
End Sub

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


3. Worsheet runs well protected but when Shared generates a error
"Activate method of OLEObject failed"

4. Debugging the code, found the activate from the TextBox is where
the error occurs.
5 Turn on the "Trust Access to Visual basic Project" but the bug
remains.

6. Is there a way to "jump" to the next TextBox using a method
allowed in a shared environment?

All ideas welcome and appreciated.

Thanks

Jose Luis



--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=376409

Reply
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
TextBox1 to Label4 damorrison Excel Discussion (Misc queries) 5 March 12th 06 04:05 PM
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) helmekki[_29_] Excel Programming 1 October 15th 04 04:15 AM
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) helmekki[_27_] Excel Programming 2 October 15th 04 12:32 AM
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) helmekki[_26_] Excel Programming 2 October 14th 04 05:23 AM
x = textbox1.value (somethings wrong) CAA[_18_] Excel Programming 6 March 5th 04 03:24 PM


All times are GMT +1. The time now is 10:03 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"