Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel crashes everytime I send focus from control to worksheet

I have an embedded control in my spreadsheet and everytime that the user
presses the tab key I send the focus to the next cell adjacent to the
control. However each time that this little piece of code runs it crashes
excel.

If I put a text box in the cell and send the focus to the textbox I incur no
problems.

Any explanations or help that you can give me would be greatly appreciated.
Thanks in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Excel crashes everytime I send focus from control to worksheet

Assuming a combobox added from the Control Toolbox tool bar, this works fine
for me:

Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
If KeyCode = 9 Then
ComboBox1.TopLeftCell(1, 4).Select
Selection.Value = ComboBox1.Text
End If
End Sub

Regards,
Greg

"Daves_Solutions" wrote:

I have an embedded control in my spreadsheet and everytime that the user
presses the tab key I send the focus to the next cell adjacent to the
control. However each time that this little piece of code runs it crashes
excel.

If I put a text box in the cell and send the focus to the textbox I incur no
problems.

Any explanations or help that you can give me would be greatly appreciated.
Thanks in advance!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Excel crashes everytime I send focus from control to worksheet



"Greg Wilson" wrote:

Assuming a combobox added from the Control Toolbox tool bar, this works fine
for me:

Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
If KeyCode = 9 Then
ComboBox1.TopLeftCell(1, 4).Select
Selection.Value = ComboBox1.Text
End If
End Sub

Regards,
Greg

"Daves_Solutions" wrote:

I have an embedded control in my spreadsheet and everytime that the user
presses the tab key I send the focus to the next cell adjacent to the
control. However each time that this little piece of code runs it crashes
excel.

If I put a text box in the cell and send the focus to the textbox I incur no
problems.

Any explanations or help that you can give me would be greatly appreciated.
Thanks in advance!

Thanks, this works fine on my developing computer so I (assume) it will be
fine at work. I appreciate it.
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
Excel 2003 crashes when trying to send a workbook Lp12 Excel Discussion (Misc queries) 4 August 2nd 09 03:03 PM
Excel crashes when Combo Box loses focus ExcelEddie Excel Programming 1 May 17th 06 08:50 PM
Why Excel crashes everytime a cell is entered? BB Excel Discussion (Misc queries) 0 May 12th 05 03:04 PM
Possible to write VBA code to send out an EMAIL everytime a workbook is opened? Marcello do Guzman[_2_] Excel Programming 4 September 2nd 04 07:59 AM
Set Focus Problem for textbox control on multipage control ExcelDeveloperSPR Excel Programming 1 July 16th 04 08:54 PM


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