Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Move From control to cell

Hi,

I have controls on my worksheet and have code that moves from one control to
another. That works fine.

I would like to jump from one control to a cell address, but the following
doesn't seem to work. Any suggestions would be greatly appreciated!

Private Sub GroupBox10_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim bBackwards As Boolean
Const ctlPrev As String = "ComboBox2"


Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
Application.ScreenUpdating = False
'Determine forwards or backwards
bBackwards = CBool(Shift)
'Activate the appropriate control based on key(s) pressed
If bBackwards Then
ActiveSheet.OLEObjects(ctlPrev).Activate
Else
Range("D20").Activate
End If
Application.ScreenUpdating = True
End Select
End Sub

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
r/t 2110 - Can't Move Focus to control JMay Excel Programming 1 November 11th 08 04:26 PM
Move Control with Scroll donwb Excel Programming 2 May 5th 08 01:27 AM
Move from cell A1 to R362 by selecting control tool or something Sheila Excel Discussion (Misc queries) 5 March 21st 08 12:08 AM
How do I get a Control Button in Excel to move down the page when. Digger48 Excel Discussion (Misc queries) 1 April 13th 05 01:05 PM
How to get Control M to move cursor down Dag Adamson Excel Programming 2 December 20th 03 03:33 PM


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