Hello, I need a bit of help with VBA.
I've been programming in VBA for about a year, and I come here very often to find answers for questions I might have, but this one is stumping me.
I'm developing a product where people in my org can use different templates to create different charts. Each chart that's created is put on a new chart sheet (the type where the chart is the entire page).
What I want is to have a button that will print only the created charts to PDF. I have it currently working, but only if ALL the charts possible are created. Is there a way to have it print to PDF only the ones that have been created?
For example, users have the option to use templates 1, 2, or 3, but if someone only needs to use 1 and 3, I want the "print to PDF" button to publish just those two. Currently it will only work if charts 1, 2, and 3 are all present.
What I'm thinking is when the chart is created, add the name of it to an array, and then have the print to PDF macro print the array? Again I'm kind of a newbie so I'm sure there's a better way to do this.
Thanks!
I've been programming in VBA for about a year, and I come here very often to find answers for questions I might have, but this one is stumping me.
I'm developing a product where people in my org can use different templates to create different charts. Each chart that's created is put on a new chart sheet (the type where the chart is the entire page).
What I want is to have a button that will print only the created charts to PDF. I have it currently working, but only if ALL the charts possible are created. Is there a way to have it print to PDF only the ones that have been created?
For example, users have the option to use templates 1, 2, or 3, but if someone only needs to use 1 and 3, I want the "print to PDF" button to publish just those two. Currently it will only work if charts 1, 2, and 3 are all present.
What I'm thinking is when the chart is created, add the name of it to an array, and then have the print to PDF macro print the array? Again I'm kind of a newbie so I'm sure there's a better way to do this.
Thanks!