Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
TextBox1 to Label4 | Excel Discussion (Misc queries) | |||
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) | Excel Programming | |||
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) | Excel Programming | |||
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) | Excel Programming | |||
x = textbox1.value (somethings wrong) | Excel Programming |