Excel VBA equivalent to Word VBA System -


i have word vba function i'm trying build in excel vba (the reason behind choice comes this question) , i'm stuck @ following problem:

the word vba function uses system.privateprofilestring extensively, throws compile error: invalid qualifier error when applied excel vba. what's equivalent statement in excel? alternatively, how work way around this?

example of use:

strhomesharepath = system.privateprofilestring("", "hkey_current_user\volatile environment", "homeshare") 

hi if wand read regesty in excel can way.

sub test() dim strpath string     strpath = regkeyread("hkey_current_user\volatile environment\homeshare") end sub  function regkeyread(i_regkey string) string dim myws object    on error resume next   'access windows scripting   set myws = createobject("wscript.shell")   'read key registry   regkeyread = myws.regread(i_regkey) end function 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -