performance - is better to call a inBuilt VBA function with or without its Class? -


some inbuilt functions in vba can called or without class. 1 better use?

when calling sub/function

vba.format(date,"yy-mm-dd") 'or format(date,"yy-mm-dd") 

also when dimensioning variable, class might or might not used. in case, better?

dim xmldoc msxml2.domdocument60 'or dim xmldoc domdocument60 

i tend use class , name in case has defined function/sub/type bring conflicts. how performance? when having great amount of codes , procedures, 1 or other have impact on performance/speed? there other aspect take in account when deciding whether use 1 form or other?

if understanding correctly, , if understanding of vba correct, doesn't make difference in terms of performance whether qualify property or method library prefix. don't think necessary qualify objects referenced within vba library (if indeed working in vba environment, opposed .net using interop), when set external references (such msxml2, or scripting), might beneficial qualify function reference clarity.

using qualified name can improve clarity (in cases). year down road, when else goes maintain code, can helful them recognize functions defined in referenced library (such msxml2). also, in cases referenced library contains function same name either vba library, or library set reference, need qualify function name.

fully qualifying function names referenced libraries practice. while vba library set reference within vba application, take 1 library don't need qualify.

note using qualified names mean typing. since app written in vba, using vba.function semi-redundant. referenced libraries, need choose between clarity/maintainability, , ease of typing (i have subscribed school says "write code in way benefit next person has deal it" before making "easier" myself write.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -