Thank You So Much!
Thank You So Much!
Last edited by Rajeshkumar R; 12-29-2016 at 11:28 PM. Reason: Query Solved
Hi Rajeshkumar R,
Try the attached mofied copy of your file which contains the following code using an API Timer (Application Programming Interfaces). I had problems using your Label (it did not display properly), so I had to replace it. Please note that the timer MUST be stopped (done by the code below) when the UserForm closes and before the file closes or Excel may crash.
In the ThisWorkbook code module:
In the UserForm1 Code module:![]()
Please Login or Register to view this content.
In Ordinary Code Module ModApiTimer:![]()
Please Login or Register to view this content.
It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:![]()
Please Login or Register to view this content.
This option requires all variables to be declared and will give a compiler error for undeclared variables.![]()
Please Login or Register to view this content.
To access a Code Module in VBA:
a. 'Left Click' on any cell in the Excel Spreadsheet.
b. ALT-F11 to get to VBA.
c. CTRL-R to get project explorer (if it isn't already showing).
d. 'Double Click' on the module you want to access in the 'Project Explorer'.
e. Insert code into the module if needed. 'Option Explicit' should only appear ONCE at the top of the module.
Lewis
Dear LJMetzger,
Thank You So Much for your suggestions, It just Awesome!
And the way you had explained also, its very crystal clear and gave me some confident to learn more on this VBA...
Once again Thank You So Much!
Regards,
Rajeshkumar R
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks