Solved

Visio 2013 - VBA - Open File procedure

Posted on 2014-04-01
2
481 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 52

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

The ability to add structure to Visio diagrams using containers, lists and callouts is one of my favorite features in Visio 2010. In this article I’ll describe a mashup of containers and lists that meet a real-world need. Prior to reading this ar…
Book Review: Using Microsoft Visio 2010 by Chris Roth   Disclaimer: The author of Using Visio 2010 is a friend and fellow Visio MVP. Whether you’re new to Visio or are upgrading to Visio 2010 from a previous version, you will find a lot to like…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

626 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