Retrieving page not paper dimensions

H

HainlineA

I've been trying to learn VBA on my own, minus the books on VBA, and Visio
surrounding me. Right now, I'm having a devil of a time retrieving the page
size in Visio in VBA. I'm trying to generate a dynamic calander for a
schedule, and I've gotten almost everything working so far except, that I'm
having a hard time getting the PageHeight and PageWidth values from the
Shapesheet (programatically), and every other way I've been trying.

I'm getting "Method not available" errors, or object undefined errors
everytime I think I'm geting close. This is within a Master Shape if that
matters. I would set it up to do this on the main page, if that would be
better? Is it something I must do with the pagesheet and VBA?

The only reason why I'm not wanting to hard code it in, is that I'd like to
try to reuse it for other schedules with minimal changes, as some schedules
will be on substanially larger pages than others, not too mention that there
can be 40 - 60 months on a schedule. I'm thinking that this is a simple
solution, I'm just typing something in wrong.
 
H

HainlineA

I fixed it.
Page_Height =
Application.ActiveWindow.Master.PageSheet.CellsU("PageHeight").Result("in")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top