Sunday, August 11, 2013

How to Make VBA code run faster

Most of the times VBA Developer encounter this issue that there VBA code is taking lot of time to execute, hence i am posting some of the tips that will help VBA code to run faster.

1)Always make Screen Updating Value to false before running the program, it will save lot of time.
    To prove this lets write a simple program without turn off screen updating values and with turn off screen update values.

Condition1 :When Screen Updating is not mentioned by default its true.

Public Function TestVBACode()
       Program_Start_Time = Timer
               For i = 1 To 10
                    Range("A" & i).value = "Hello VBA"
               Next i
        MsgBox Program_Start_Time - Start & "Seconds"
 End Function
                                                      
                                                                                                  
     
Condition2:When Screen Updating is mentioned as false.

Public Function TestVBACode()
       Application.ScreenUpdating   = False
             Program_Start_Time = Timer
                     For i = 1 To 10
                           Range("A" & i).value = "Hello VBA"
                    Next i
         Application.Screen Updating = True

       MsgBox Program_Start_Time - Start & "Seconds"

End Function

                                                               


Sunday, August 4, 2013

Mobile Testing using QTP(UFT 11.5)

I found one link very much suitable for Mobile Automation Testing using QTP and hence thought to share the same with the community.

This is Pefecto mobile addin and very easy to use with QTP.Below link will guide you step by step and also specify the benefit of it.

Mobile Automation Testing using QTP