excel - Permanently Save Variables with VBA? -
excel - Permanently Save Variables with VBA? -
one of many userforms in excel uses file paths locate files copy,move,delete depending on situation. bulk of these file locations in same directory , looking permanent way store file paths configuration file or settings files vba allows in same place.
i thinking adding string paths hidden personal workbook , reference each cell when assigning variable develop on machine , rollout other pc , won't avoid overwriting them.
i've heard text files can used or savesettings() method i've used before.
what best way accomplish task , worth doing?
if users/different pcs can think of 2 ways.
way 1
store values in excel settings.
use application.defaultfilepath
store path , read later. example
sub storepath() application.defaultfilepath = "c:\temp" end sub sub getpath() msgbox application.defaultfilepath end sub
way 2
store values in registry. see little tutorial wrote couple of years ago.
excel vba excel-vba
Comments
Post a Comment