Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Office > Visio

LinkBack Thread Tools Display Modes
Old 12-09-2016, 01:29 AM
Mike.Visio Mike.Visio is offline Windows 10 Office 2013
Join Date: Dec 2016
Posts: 1
Mike.Visio is on a distinguished road
Default Newbie need help with VBA

Newbie need help with VBA

Hello to all. I'm a newbie in Visio VBA. I use 2013. I created a document for a Network documentation. ("Documentation.vsd"). I made 3 new pages. ("Room1", "Room2", "Room3"). I Have also a "Start" Page
In the "ThisDocument" I created for "Document_BeforeDocumentSave" a Code how reset the Color for any shapes.

Here is my Question:

When I Close the document, my Code works fine, BUT: to Change the colour I use this for each page: (Room1,2,3) in one Code. Here for exampple for Room1:

Application.ActiveWindow.Page = Application.ActiveDocument.Pages.ItemU("Room1")
Application.ActiveWindow.ViewFit = visFitPage
Dim UndoScopeID1 As Long
UndoScopeID1 = Application.BeginUndoScope("Füllfarbe")
Application.ActiveWindow.Page.Shapes.ItemFromID(23 ).CellsSRC(visSectionObject, visRowFill, visFillForegnd).FormulaU = "THEMEGUARD(RGB(238,172,72))"
Application.EndUndoScope UndoScopeID1, True
The Problem is, all the pages are just a second as active, and the changes makes a flicker, because the pages are changing for my Code from Room1 to Room2 and room 3.
Then I go back to the "Start" page.

My Question:

How can I let the Focus on the Start page and Change something (like colour) on another page, that isn't active? (Sorry for my broken english)

Thanks for all answers!
Reply With Quote

no active window

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to open the Insert>Cover Page window /dialog box Catty Word VBA 3 02-24-2014 06:02 PM
Possible to open each page of file in a different window? Fran71 Word 2 04-27-2012 07:25 PM
newbie help please cjpga Outlook 2 06-23-2011 01:24 PM
newbie question DanSandbergUCONN Word 5 03-06-2011 04:27 PM
How to insert an active page link JudeL Word 0 10-02-2009 03:50 AM

All times are GMT -7. The time now is 06:26 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc. is not affiliated with Microsoft