excel - Choose active page in Visio -


edited: didn't phrase will.. trying open visio (working) , open page in document of choosing. thanks

dim fname string dim vsapp object  on error resume next set vsapp = getobject(, "visio.application") if vsapp nothing set vsapp = createobject("visio.application") if vsapp nothing msgbox "can't connect visio" exit sub end if end if on error goto 0  fname = "c:\myfile.vsd"  if not intersect(target, range("c2")) nothing vsapp.documents.open fname vsapppage = "mypage" cancel = true elseif not intersect(target, range("c4")) nothing vsapp.documents.open fname vspage = "mypage2" vsapp.activepage = vspage cancel = true end if 

but code trying rename active page. select page name in quotes.

try:

vsapp.activewindow.page = vspage 

if doesn't work, try:

vsapp.activewindow.page = vsapp.documents.open(fname).pages(vspage) 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -