Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default SCREEN NOT UPDATING

Hi
I have a listbox in my sheet and a comadbutton that runs a macro.
I select a name from the list and click on command button.
I have application.screenupdating= False at the start of the macro and
application.screenupdating= true at the end of the macro.
but after the macro is done, and when I click on the list box, I am not able
to select an item from the list. I have to click on to the worksheet 2 or 3
times to be able to select from listbox.
Though If I dont have screenupdating commands in the macro, I am able to
select an item from list box after macro is done.
But since my macro opens and closes another workbook, I want screenupdating
set to false and then set to true.
Any advise what could be the problem

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default SCREEN NOT UPDATING

I think you will need to show us your code. It could be you have and error
handling routine that gets executed and that is not where you turn
ScreenUpdating back on at; or you could have a test that executes Exit Sub
before the ScreenUpdating is turned back on... there is no way for us to see
what is happening without being able to see your code.

--
Rick (MVP - Excel)


"ub" wrote in message
...
Hi
I have a listbox in my sheet and a comadbutton that runs a macro.
I select a name from the list and click on command button.
I have application.screenupdating= False at the start of the macro and
application.screenupdating= true at the end of the macro.
but after the macro is done, and when I click on the list box, I am not
able
to select an item from the list. I have to click on to the worksheet 2 or
3
times to be able to select from listbox.
Though If I dont have screenupdating commands in the macro, I am able to
select an item from list box after macro is done.
But since my macro opens and closes another workbook, I want
screenupdating
set to false and then set to true.
Any advise what could be the problem


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UB UB is offline
external usenet poster
 
Posts: 120
Default SCREEN NOT UPDATING

my code is : ' This code in sheet "rev" of my workbook
**************
Application.ScreenUpdating = False

Application.Workbooks.Open _
"C:\CR\master 2009.xls"
Worksheets("Sheet1").Activate
nextrow = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
a1 = Worksheets("Sheet1").Range("b2", "d" & nextrow).Value
ActiveWorkbook.Save
Application.Workbooks("master 2009.xls").Close

For asmod = 1 To UBound(a1)
With Worksheets("rev")
If .Range("c2").Value = a1(asmod, 1)
asmod1 = asmod
Exit For
End If
End With
Next asmod

Application.Workbooks.Open _
"C:\CR\audit 2009.xls"

Worksheets("Sheet1").Activate
comment = ActiveSheet.Range("o2").Value

ActiveWorkbook.Save
Application.Workbooks("audit 2009.xls").Close
Application.ScreenUpdating = True

' value of comment stored in the sheet who called the procedure
worksheet("rev").range("m2").value = comment

***********************

"Rick Rothstein" wrote:

I think you will need to show us your code. It could be you have and error
handling routine that gets executed and that is not where you turn
ScreenUpdating back on at; or you could have a test that executes Exit Sub
before the ScreenUpdating is turned back on... there is no way for us to see
what is happening without being able to see your code.

--
Rick (MVP - Excel)


"ub" wrote in message
...
Hi
I have a listbox in my sheet and a comadbutton that runs a macro.
I select a name from the list and click on command button.
I have application.screenupdating= False at the start of the macro and
application.screenupdating= true at the end of the macro.
but after the macro is done, and when I click on the list box, I am not
able
to select an item from the list. I have to click on to the worksheet 2 or
3
times to be able to select from listbox.
Though If I dont have screenupdating commands in the macro, I am able to
select an item from list box after macro is done.
But since my macro opens and closes another workbook, I want
screenupdating
set to false and then set to true.
Any advise what could be the problem



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
print box opens in right screen of dual screen setup why gerrys Excel Discussion (Misc queries) 1 June 30th 06 06:47 PM
Need to convert point on screen to various screen resolutions Donna YaWanna Excel Discussion (Misc queries) 5 October 26th 05 10:10 PM
Screen Updating Michael Excel Worksheet Functions 3 March 14th 05 09:53 PM
Screen updating Mark Stephens Charts and Charting in Excel 0 February 18th 05 03:55 PM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM


All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"