View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] unowho247@gmail.com is offline
external usenet poster
 
Posts: 2
Default Unable to Set Excel ScreenUpdating from ComboBox event

I am using several Combo Boxes on a workbook to set views for a data
table and chart. I am close to being done with this project, however,
I'm trying to eliminate some screen flicker... The
Application.ScreenUpdating = False attempt at line 3 doesn't cause any
errors, but it doesn't change the property of Excel either. If I step
into the code in break mode, nothing happens either. However in break
mode, if I type the line into the immediate pane, the property
changes.

Has anyone seen this happen before? I can't determine if it is by
design or simply some sort of bug this workbook is going through...

Current project references a
VBA
MS Excel 11.0
OLE Automation
MS Office 11.0
MS Forms 2.0

Example Code:

Private Sub cmb_Element_Click()
If c_call Then Exit Sub
Application.ScreenUpdating = False
Call ReplaceTarget
Call TargetChart_Range
Me.cmb_TimePeriod.Visible = True
Me.cmb_Paper.Visible = True
If Me.cmb_Element.List(Me.cmb_Element.ListCount - 1, 0) = "<Select
Element" Then
Me.cmb_Element.RemoveItem Me.cmb_Element.ListCount - 1
End If
Application.ScreenUpdating = True
Me.Range("C35").Select
End Sub

Thanks for any help!