Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have a macro with 5 different userforms which will help the user to get the correct input. When I run the macro by steps (F8) the macro runs OK, but when i run the macro by (F5) the macro slow very much down in speed. I think the problem is the Userforms, but I am not sure. I have been using Userform.hide and unlode Userform to see if it speeds up the macro, but result is negative. Any one who has any sugestions? Johan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You may want to add some break point using F9 to help find out what part of the code is running slow. Set a break point in the middle of the code and then run F5. then Press F5 again to run the 2nd part of the macro. Check if the part before the break point is taking long or after the break point. Move the break point or add multiple break points to isolate where the code is running slow. "Johan" wrote: Hi, I have a macro with 5 different userforms which will help the user to get the correct input. When I run the macro by steps (F8) the macro runs OK, but when i run the macro by (F5) the macro slow very much down in speed. I think the problem is the Userforms, but I am not sure. I have been using Userform.hide and unlode Userform to see if it speeds up the macro, but result is negative. Any one who has any sugestions? Johan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() The macro as basic is searching for files on the computer and I know that it is while searching the macro slowing down. But I think, or it looks like , it have something to to with the user form because it will no hide. It seems that the macro not take its time to close the userform "properly" Johan Joel skrev: You may want to add some break point using F9 to help find out what part of the code is running slow. Set a break point in the middle of the code and then run F5. then Press F5 again to run the 2nd part of the macro. Check if the part before the break point is taking long or after the break point. Move the break point or add multiple break points to isolate where the code is running slow. "Johan" wrote: Hi, I have a macro with 5 different userforms which will help the user to get the correct input. When I run the macro by steps (F8) the macro runs OK, but when i run the macro by (F5) the macro slow very much down in speed. I think the problem is the Userforms, but I am not sure. I have been using Userform.hide and unlode Userform to see if it speeds up the macro, but result is negative. Any one who has any sugestions? Johan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() After you unload all your userforms and set ScreenUpdating = True, put in a "DoEvents" to force Excel to catch up. That should cause the userforms to be hidden. The "Pause 10" won't do anything. Are your file searches running across a network? If so, that can be very slow and it may be something that you can't avoid. HTH, Eric "Johan" wrote: The macro as basic is searching for files on the computer and I know that it is while searching the macro slowing down. But I think, or it looks like , it have something to to with the user form because it will no hide. It seems that the macro not take its time to close the userform "properly" Johan Joel skrev: You may want to add some break point using F9 to help find out what part of the code is running slow. Set a break point in the middle of the code and then run F5. then Press F5 again to run the 2nd part of the macro. Check if the part before the break point is taking long or after the break point. Move the break point or add multiple break points to isolate where the code is running slow. "Johan" wrote: Hi, I have a macro with 5 different userforms which will help the user to get the correct input. When I run the macro by steps (F8) the macro runs OK, but when i run the macro by (F5) the macro slow very much down in speed. I think the problem is the Userforms, but I am not sure. I have been using Userform.hide and unlode Userform to see if it speeds up the macro, but result is negative. Any one who has any sugestions? Johan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
slow macro | Excel Discussion (Misc queries) | |||
slow macro help | Excel Programming | |||
Macro is very slow | Excel Discussion (Misc queries) | |||
Macro help, very slow | Excel Programming | |||
Slow macro | Excel Programming |