Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is another example from the help files:
KeyDown Event, TextBox Control, CurLine, CurTargetX, CurX, Text Properties Example Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) TextBox2.Text = TextBox1.CurLine TextBox3.Text = TextBox1.CurX TextBox4.Text = TextBox1.CurTargetX End Sub I used this syntax to allow moving the cursor if the user pressed tab or enter because it seems there is no other way for the user to get out of the combobox except by using the mouse. Dan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As usual I didn't read far enough. I have never used this method before, so
I will have to play around with it to get to understand how it works. But offhand, I don't see what would cause a calc loop. I know it sometimes happens in BeforeClose events if the calcultion isn't autocalc isn't turned off. Interesting. "dan dungan" wrote: Here is another example from the help files: KeyDown Event, TextBox Control, CurLine, CurTargetX, CurX, Text Properties Example Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) TextBox2.Text = TextBox1.CurLine TextBox3.Text = TextBox1.CurX TextBox4.Text = TextBox1.CurTargetX End Sub I used this syntax to allow moving the cursor if the user pressed tab or enter because it seems there is no other way for the user to get out of the combobox except by using the mouse. Dan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I went to tools/options and selected manual calculation.
Then I change the code to: Private Sub cboPartnum_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) Select Case KeyCode Case 9 'Tab Worksheets("QuotedPart").Range("d2").Activate Case 13 'Enter Worksheets("QuotedPart").Range("d2").Activate Case Else 'do nothing End Select Application.Calculate End Sub This solves the problem of the "calculation loop" that I can't determine the cause for. However, it bring up these questions for me: This file is an .xlt file placed on the network 1. If the use has other workbooks set to automatic calculation, how will this effect my template? I'm going to use xlCalculationManual on work_book open. 2. The user is forced to press F9--possibly several times--to complete the quote. There are cells to populate with values depending on the part number to include all the charges. I'm going to use application.calculate on worksheet_selection change. Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ComboBox Issue | Excel Programming | |||
Combobox issue! | Excel Programming | |||
Combobox Issue | Excel Programming | |||
Another ComboBox Issue | Excel Programming | |||
Another ComboBox Issue | Excel Programming |