Describe the function of the following statements as used in vba
1. Sheets ("sheets"). Range (A1")=me .T1.value
2. Exit button
1.
Assigns value from object T1 in the form to cell A1 in sheet "Sheet1
Me refers to the form and T1 is the object from where the value is fetched.
2.
Exit Sub is used to exit out of the subprocedure on meeting a particular objective. That means when the execution of code meets Exit Sub , it will exit that Sub and continue with any other code of execution. “Exit Sub” , exit the procedure without running the rest of the code that comes after that.
* Starts with Sub <Subprocedure_Name> and is ended with End Sub.
*You can use Exit Sub if a certain criteria is met.
Comments
Leave a comment