Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBA on Visio 2013 - how to delete a range of pages

Posted on 2013-12-22
1
Medium Priority
?
1,802 Views
Last Modified: 2013-12-23
I would like to delete the first five pages in my visio file using VBA.
What is the code to do this?
0
Comment
Question by:brothertruffle880
1 Comment
 
LVL 31

Accepted Solution

by:
Scott Helmers earned 2000 total points
ID: 39735267
This will work by deleting "page 1" five times (each time you delete the page that is currently number 1, the next page becomes number 1).
Sub DeleteFirstFivePages()
    For i = 1 To 5
        ActiveDocument.Pages(1).Delete (False)
    Next
End Sub

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I wrote this article to help simplify the process of combining multiple subnets. This can be used for route summarization also but there are other better ways to summarize routes, This article is a result of questions I participate in here at Ex…
There are times where you would like to have access to information that is only available from a different network. This network could be down the hall, or across country. If each of the network sites have access to the internet, you can create a ne…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question