excel vba - Keeping variables between calls to a DLL -


i writing add-in excel use in vba. there way keep variable values in dll between calls dll. made them global in dll, values don't remain between calls.

for example, during 'testing', assign (within dll) excel sheet variable 'hp'. when run 'test2' give 'zz' value of "home page" using zz=hp.name, says object not variable or block variable not set. hp variable seems not assigned sheet anymore.

public tester finance.root  sub testing()     dim tester finance.root     set tester = new finance.root     set aa = sheets(1).range("a1")     bb = tester.startup(aa) end sub  sub test2()     call tester.trial(zz) end sub 

and in dll

sub test2(tt)     tt = hp.name end sub 

thanks.

you've created new local variable called tester in testing()

delete

dim tester finance.root 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -