Solved

Visio 2013 - VBA - Open File procedure

Posted on 2014-04-01
2
479 Views
Last Modified: 2014-04-01
I would like to run the procedure below (with a few additional lines of enhancements).  
- Is there any way I can generate a message to appear saying "Please wait" as soon as the file is opened so that the user doesn't start typing away as soon as they see a glimmer of their diagram.  
- Is there any way I can block keyboard entry until after the procedure below is run?  Perhaps blank out the screen with the "Please wait" message?

Private Sub Document_DocumentOpened(ByVal doc As IVDocument)

    Set Win1 = ActiveWindow

    ActiveWindow.Page = doc.Pages(1)        ' move to page 1
    
    ActiveWindow.Zoom = -1                  ' set zoom to whole page
    
   '  more code to be input here
   '  more code to be input here

    MsgBox "You are ready to work." 


End Sub

Open in new window

0
Comment
Question by:brothertruffle880
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39969180
Hi,
pls try
Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
Application.ShowChanges = False

    Set Win1 = ActiveWindow

    ActiveWindow.Page = doc.Pages(1)        ' move to page 1
    
    ActiveWindow.Zoom = -1                  ' set zoom to whole page
    
   '  more code to be input here
   '  more code to be input here

Application.ShowChanges = True
    MsgBox "You are ready to work." 


End Sub

Open in new window

Regards
0
 

Author Comment

by:brothertruffle880
ID: 39969396
Thanks Rgonzo!
Perfect.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Have you ever created a custom Visio stencil – a collection of your own unique master shapes – and then created a drawing by dragging masters onto the drawing page? Have you then made changes to the stencil master and wondered why the shapes on the …
David Parker’s latest book, Microsoft Visio 2010: Business Process Diagramming and Validation, will give you the tools to turn flowcharts and other business diagrams into valuable, data-driven corporate assets. Armed with the knowledge you’ll gain f…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

734 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