【分享成果,随喜正能量】不经一番寒彻骨,怎得梅花扑鼻香。成大事不在于力量的大小,而在于能坚持多久,成功总是给坚持不懈的人更多优待。。
跟我学VBA,我这里专注VBA, 授人以渔。我98年开始,从源码接触VBA已经20余年了,随着年龄的增长,越来越觉得有必要把这项技能传递给需要这项技术的职场人员。希望职场和数据打交道的朋友,都来学习VBA,利用VBA,起码可以提高自己的工作效率,可以有时间多陪陪父母,多陪陪家人,何乐而不为呢?
这讲我们继续学习64位Office API声明语句第83讲,这些内容是MS的权威资料,看似枯燥,但对于想学习API函数的朋友是非常有用的。

' /////////////////////////
' //
' Security Status Codes //
' //
' /////////////////////////
' Not all privileges referenced are assigned to the caller.
Const ERROR_NOT_ALL_ASSIGNED = 1300&
' Some mapping between account names and security IDs was not done.
Const ERROR_SOME_NOT_MAPPED = 1301&
' No system quota limits are specifically set for this account.
Const ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302&
' No encryption key is available. A well-known encryption key was returned.
Const ERROR_LOCAL_USER_SESSION_KEY = 1303&
' The NT password is too complex to be converted to a LAN Manager
' password. The LAN Manager password returned is a NULL string.
Const ERROR_NULL_LM_PASSWORD = 1304&
' The revision level is unknown.
Const ERROR_UNKNOWN_REVISION = 1305&
' Indicates two revision levels are incompatible.
Const ERROR_REVISION_MISMATCH = 1306&
' This security ID may not be assigned as the owner of this object.
Const ERROR_INVALID_OWNER = 1307&
' This security ID may not be assigned as the primary group of an object.
Const ERROR_INVALID_PRIMARY_GROUP = 1308&
' An attempt has been made to operate on an impersonation token
' by a thread that is not currently impersonating a client.
Const ERROR_NO_IMPERSONATION_TOKEN = 1309&
' The group may not be disabled.
Const ERROR_CANT_DISABLE_MANDATORY = 1310&
' There are currently no logon servers available to service the logon
' request.
Const ERROR_NO_LOGON_SERVERS = 1311&
' A specified logon session does not exist. It may already have
' been terminated.
Const ERROR_NO_SUCH_LOGON_SESSION = 1312&
' A specified privilege does not exist.
Const ERROR_NO_SUCH_PRIVILEGE = 1313&
' A required privilege is not held by the client.
Const ERROR_PRIVILEGE_NOT_HELD = 1314&
' The name provided is not a properly formed account name.
Const ERROR_INVALID_ACCOUNT_NAME = 1315&
' The specified user already exists.
Const ERROR_USER_EXISTS = 1316&
' The specified user does not exist.
Const ERROR_NO_SUCH_USER = 1317&
' The specified group already exists.
Const ERROR_GROUP_EXISTS = 1318&
' The specified group does not exist.
Const ERROR_NO_SUCH_GROUP = 1319&
' Either the specified user account is already a member of the specified
' group, or the specified group cannot be deleted because it contains
' a member.
Const ERROR_MEMBER_IN_GROUP = 1320&
' The specified user account is not a member of the specified group account.
Const ERROR_MEMBER_NOT_IN_GROUP = 1321&
' The last remaining administration account cannot be disabled
' or deleted.
Const ERROR_LAST_ADMIN = 1322&
' Unable to update the password. The value provided as the current
' password is incorrect.
Const ERROR_WRONG_PASSWORD = 1323&
' Unable to update the password. The value provided for the new password
' contains values that are not allowed in passwords.
Const ERROR_ILL_FORMED_PASSWORD = 1324&
' Unable to update the password because a password update rule has been
' violated.
Const ERROR_PASSWORD_RESTRICTION = 1325&
' Logon failure: unknown user name or bad password.
Const ERROR_LOGON_FAILURE = 1326&
' Logon failure: user account restriction.
Const ERROR_ACCOUNT_RESTRICTION = 1327&
' Logon failure: account logon time restriction violation.
Const ERROR_INVALID_LOGON_HOURS = 1328&
' Logon failure: user not allowed to log on to this computer.
Const ERROR_INVALID_WORKSTATION = 1329&
' Logon failure: the specified account password has expired.
Const ERROR_PASSWORD_EXPIRED = 1330&
' Logon failure: account currently disabled.
Const ERROR_ACCOUNT_DISABLED = 1331&
' No mapping between account names and security IDs was done.
Const ERROR_NONE_MAPPED = 1332&
' Too many local user identifiers (LUIDs) were requested at one time.
Const ERROR_TOO_MANY_LUIDS_REQUESTED = 1333&
' No more local user identifiers (LUIDs) are available.
Const ERROR_LUIDS_EXHAUSTED = 1334&
' The subauthority part of a security ID is invalid for this particular use.
Const ERROR_INVALID_SUB_AUTHORITY = 1335&
' The access control list (ACL) structure is invalid.
Const ERROR_INVALID_ACL = 1336&
' The security ID structure is invalid.
Const ERROR_INVALID_SID = 1337&
' The security descriptor structure is invalid.
Const ERROR_INVALID_SECURITY_DESCR = 1338&
' The inherited access control list (ACL) or access control entry (ACE)
' could not be built.
Const ERROR_BAD_INHERITANCE_ACL = 1340&
' The server is currently disabled.
Const ERROR_SERVER_DISABLED = 1341&
' The server is currently enabled.
Const ERROR_SERVER_NOT_DISABLED = 1342&
' The value provided was an invalid value for an identifier authority.
Const ERROR_INVALID_ID_AUTHORITY = 1343&
' No more memory is available for security information updates.
Const ERROR_ALLOTTED_SPACE_EXCEEDED = 1344&
' The specified attributes are invalid, or incompatible with the
' attributes for the group as a whole.
Const ERROR_INVALID_GROUP_ATTRIBUTES = 1345&
' Either a required impersonation level was not provided, or the
' provided impersonation level is invalid.
Const ERROR_BAD_IMPERSONATION_LEVEL = 1346&
' Cannot open an anonymous level security token.
Const ERROR_CANT_OPEN_ANONYMOUS = 1347&
' The validation information class requested was invalid.
Const ERROR_BAD_VALIDATION_CLASS = 1348&
' The type of the token is inappropriate for its attempted use.
Const ERROR_BAD_TOKEN_TYPE = 1349&
' Unable to perform a security operation on an object
' which has no associated security.
Const ERROR_NO_SECURITY_ON_OBJECT = 1350&
' Indicates a Windows NT Advanced Server could not be contacted or that
' objects within the domain are protected such that necessary
' information could not be retrieved.
Const ERROR_CANT_ACCESS_DOMAIN_INFO = 1351&
' The security account manager (SAM) or local security
' authority (LSA) server was in the wrong state to perform
' the security operation.
Const ERROR_INVALID_SERVER_STATE = 1352&
' The domain was in the wrong state to perform the security operation.
Const ERROR_INVALID_DOMAIN_STATE = 1353&
' This operation is only allowed for the Primary Domain Controller of the domain.
Const ERROR_INVALID_DOMAIN_ROLE = 1354&
' The specified domain did not exist.
Const ERROR_NO_SUCH_DOMAIN = 1355&
' The specified domain already exists.
Const ERROR_DOMAIN_EXISTS = 1356&
' An attempt was made to exceed the limit on the number of domains per server.
Const ERROR_DOMAIN_LIMIT_EXCEEDED = 1357&
' Unable to complete the requested operation because of either a
' catastrophic media failure or a data structure corruption on the disk.
Const ERROR_INTERNAL_DB_CORRUPTION = 1358&
' The security account database contains an internal inconsistency.
Const ERROR_INTERNAL_ERROR = 1359&
' Generic access types were contained in an access mask which should
' already be mapped to non-generic types.
Const ERROR_GENERIC_NOT_MAPPED = 1360&
' A security descriptor is not in the right format (absolute or self-relative).
Const ERROR_BAD_DESCRIPTOR_FORMAT = 1361&
' The requested action is restricted for use by logon processes
' only. The calling process has not registered as a logon process.
Const ERROR_NOT_LOGON_PROCESS = 1362&

我20多年的VBA实践经验,全部浓缩在下面的各个教程中:


【分享成果,随喜正能量】一个人太好了,往往倒显不出他的好处来,这如同我们对于空气,太习惯了一呼一吸,便疏忽了我们是在不停地一呼一吸。。