![]() read more will present an input box in front of the user, and they need to enter the brand of the phone they are looking for. ![]() Below Excel VBA code Excel VBA Code VBA code refers to a set of instructions written by the user in the Visual Basic Applications programming language on a Visual Basic Editor (VBE) to perform a specific task. Imagine giving your customers a user form to check the mobile phone’s price with a simple input box. For instance, employee ID, student roll number, customer contact number, seller email address, etc., are unique identifiers.Ĭheck Whether the Mobile Phone is there or not. A unique identifier is uniquely associated with all the records of the database. The result returned by the VLOOKUP function VLOOKUP Function The VLOOKUP excel function searches for a particular value and returns a corresponding match based on a unique identifier. We use the formula to look for values based on the LOOKUP VALUE (Key). If you want the example of Excel, we can give VLOOKUP as an example. So, here we have two things one is the Name of the Person and the second one is the Phone Number. Obviously, by using the name, we have used it while saving the phone number. Assume you are searching for a phone number of a particular person. Now, look at one more example of a Dictionary. Similarly, words are “Keys,” and the definition or meaning is the “Item.” With this Dictionary, we have words (keys) and the meaning of those words (item). If you have not understood KEY and ITEM, let us explain with a simple example. Now, run the code manually or using the F5 key, and a message box will show you the price ( item) of the phone ( key) we have added using “Dict.” This statement has no arguments and the personalized messages in this function are written under the double quotes while for the values the variable reference is provided. Now show the result of the variable in the VBA message box VBA Message Box VBA MsgBox function is an output function which displays the generalized message provided by the developer. Now, the variable “DictResult” has the item of the key we have added. The Key is the word we have created in the previous step, the name of the phone. Now, for another variable, “DictResult,” we will add a keyword using the “Dict” variable. This definition of the phone is its price so we will add the price to 15000. Item is nothing but the definition of the word ( key) we have added. So, let’s add the mobile phone name as “Redmi.” The Key is what the word we are adding is. We will create a new key using the “Dict” variable.
0 Comments
Leave a Reply. |