Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default Combobox-calculating issue

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Combobox-calculating issue

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default Combobox-calculating issue

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
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
ComboBox Issue Duncs Excel Programming 0 July 26th 06 04:16 PM
Combobox issue! EagleWolf Excel Programming 2 November 12th 05 01:22 PM
Combobox Issue Andy Excel Programming 2 July 27th 05 04:27 PM
Another ComboBox Issue Darrin Henry[_2_] Excel Programming 2 April 16th 05 03:03 PM
Another ComboBox Issue Darrin Henry[_2_] Excel Programming 1 April 16th 05 09:18 AM


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