Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
print box opens in right screen of dual screen setup why | Excel Discussion (Misc queries) | |||
Need to convert point on screen to various screen resolutions | Excel Discussion (Misc queries) | |||
Screen Updating | Excel Worksheet Functions | |||
Screen updating | Charts and Charting in Excel | |||
When updating a worksheet, how do I create a link updating the sa. | Excel Worksheet Functions |