Solved

Visio 2013 - VBA - Open File procedure

Posted on 2014-04-01
2
470 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
2 Comments
 
LVL 49

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

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…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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