In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what vba variable name naming rules, I believe most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Vba variable name naming rules: 1, the first character must be a letter; 2, the name can contain letters, numbers and underscores; 3, the name can not contain spaces, periods, exclamation points, can not contain the characters [@, &, $and #]; 4, the name contains a maximum of 255characters.
Vba variable name naming convention:
1. VBA has the following naming rules for subroutines and functions:
1) the first character must be a letter.
2) names can contain letters, numbers, and underscores.
3) the name cannot contain spaces, periods, exclamation points, or the characters @, &, $, and #.
4) the name contains a maximum of 255 characters.
2. Type of variable
Variables are used to hold process data. Here are the variable types used in VBA. The naming convention of the variable name is the same as the procedure name. Variables are defined using the Dim variable name as data type
3. Declaration of variables
Next, you will create a procedure that prompts the user for a name, which is then displayed in the message box.
Public Sub KnowYourName () Dims Name As StringsName = InputBox ("Enteryourname:") MsgBox "Hi" & sNameEnd Sub
Where Name is a string variable, there is no need to provide a data type in the Dim statement. If no data type is provided, the variable is specified as the default data type Variant in VBA. If you do not define the data type, it will take up space and improve the running time.
Dim iNumberOfStudents as IntegerDim dTestDate as Date'The following line creates a variable length stringDim sLastName as String'The next line creates a 2char. Fixed length stringDim sState as String*2 above is all the content of the article "what are the naming rules of vba variable names?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.