Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need a "BACK" functionality (Button/Link/Command/Macro)

90 views
Skip to first unread message

Andrew

unread,
Dec 29, 2009, 12:00:01 PM12/29/09
to
Example: A Visio (2003) document with 100 pages. There are hyperlinks on 10
of the pages that link to either a shape on the "ORDER" page or to the page
itself. Therefore it is easy to navigate TO the "ORDER" page. But when
presenting, the viewers will sometimes want to take a quick peek back at what
got them there. That is, not following the document's flow.

I need a "BACK" button/link/command/macro.

Is there a way to just go "BACK" to the previous page that was viewed?

Thank you in advance,
Andrew

John Goldsmith_Visio_MVP

unread,
Dec 30, 2009, 8:06:57 AM12/30/09
to
Hello Andrew,

This sounds like Off Page Reference shapes might help here (see File /
Shapes / Flowcharts / Basic Flowchart Shapes) as these include the option of
adding a 'return shape' on the target page.

If you're just using standard hyperlinks (Ctrl + K) to shapes then you might
want to have a look at the web toolbar, which includes back / forward
functionality (see View / Toolbars / Web)

Hope that helps.

Best regards

John


John Goldsmith (Visio MVP)
www.visualSignals.typepad.co.uk
www.visualSignals.co.uk

"Andrew" <And...@discussions.microsoft.com> wrote in message
news:E1C187A9-9DCB-4B12...@microsoft.com...

Paul Herber

unread,
Dec 30, 2009, 8:55:28 AM12/30/09
to

menu View -> Toolbars - Web
This toolbar contains Back and Forward buttons.Customizing the toolbars can give you these
buttons on the Standard or any other toolbar.


--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
Electrical for Visio http://www.electrical.sandrila.co.uk/
Electronics Packages for Visio http://www.electronics-packages.sandrila.co.uk/

Andrew

unread,
Jan 2, 2010, 1:33:01 PM1/2/10
to
Thank you guys. Both tips are very helpful and just what I needed.

One question however. Every time I try to use the forward or back buttons,
in the Web toolbar, I get a warning "Hyperlinks can be harmful..." and
prompted to allow them or not. That makes the buttons essentially useless.
How can I turn off the warning?

Thanks again,
Andrew

Andrew

unread,
Jan 4, 2010, 1:34:02 PM1/4/10
to
Well, I found this (http://support.microsoft.com/default.aspx/kb/829072)
knowledge base article, which allows me to disable the nag. That helps a
lot. I can display the 'web' toolbar and use it to navigate forwards and
back when I am in 'normal view'. Howevever, when I am in Full Screen
(presentation) view, the ALT+Left and ALT+Right hotkeys do not work and of
course then toolbar isn't visible to use.

Is there any keyboard or mouse commands that can be used for Forward and
Back when in Full Screen view?

Thanks in advance,
Andrew

Andrew

unread,
Jan 4, 2010, 2:30:02 PM1/4/10
to
I'm trying to use a macro that will perform the functionality of the 'back'
button. However, I'm not very handy with VBA. Any help will be appreciated.

In the "Visio Objects" for "ThisDocument" I have put the following, which is
intended to provide a value for the last page visited.
Private Sub Page_Activate()
LastPage = WhatPage
WhatPage = ActiveWindow.Page
End Sub

In the Modules / NewMacros I put the following to be the working macro.
Global WhatPage As String, LastPage As String
Sub GoBack()
' Keyboard Shortcut: Ctrl+Shift+B
Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)
End Sub

But nothing happens. Please advise on where I'm going wrong.

Thanks in advance,
Andrew

Paul Herber

unread,
Jan 4, 2010, 9:15:51 PM1/4/10
to
On Mon, 4 Jan 2010 11:30:02 -0800, Andrew <And...@discussions.microsoft.com> wrote:

>I'm trying to use a macro that will perform the functionality of the 'back'
>button. However, I'm not very handy with VBA. Any help will be appreciated.
>
>In the "Visio Objects" for "ThisDocument" I have put the following, which is
>intended to provide a value for the last page visited.
> Private Sub Page_Activate()
> LastPage = WhatPage
> WhatPage = ActiveWindow.Page
> End Sub

At the very least you need to change:

Private Sub Page_Activate()
LastPage = ActiveWindow.Page
End Sub


--
Regards, Paul Herber, Sandrila Ltd.

DFD/SSADM for Visio http://www.visio-dfd.sandrila.co.uk/
Now in English, Dutch, French, Portuguese and Spanish

Andrew

unread,
Jan 5, 2010, 2:25:01 PM1/5/10
to
I'm not following you Paul.

I believe ActiveWindow.Page is the current page, not the last page.
Therefore WhatPage = ActiveWindow.Page. When the user goes to a new page
then LastPage is set to WhatPage, that is the previous page. When the macro
is run then the user is sent back to LastPage.

However, I did try your suggestion.

When running the GoBack() macro, I still receive the following error:
Run-time error '-2032465758 (86db08a2)':
Invalid container identifier.
And the line "Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)" is highlighed in yellow.

I'm thinking this line of code is the first that needs to be put in the
correct syntax. But I don't have a clue on what needs to change.

Thanks again,
Andrew

Andrew

unread,
Jan 5, 2010, 2:52:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I received
the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error:


Run-time error '-2032465758 (86db08a2)':
Invalid container identifier.

And the GoBack macro line of "Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)" is highligted in yellow.

I'm thinking I need to get the syntax of this line corrected first, but I
don't have a clue as to what it should be.

Thanks again,
Andrew

Andrew

unread,
Jan 5, 2010, 2:53:01 PM1/5/10
to

Thanks again,
Andrew

"Paul Herber" wrote:

> .
>

Andrew

unread,
Jan 5, 2010, 3:01:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I received
the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error:
Run-time error '-2032465758 (86db08a2)':
Invalid container identifier.
And the GoBack macro line of "Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)" is highligted in yellow.

I'm thinking I need to get the syntax of this line corrected first, but I
don't have a clue as to what it should be.

Thanks again,
Andrew

"Paul Herber" wrote:

> .
>

Andrew

unread,
Jan 5, 2010, 3:00:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I received
the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error...


Run-time error -2032465758 (86db08a2)
Invalid container identifier.
And the GoBack macro line of
Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)
is highligted in yellow.

I am thinking I need to get the syntax of this line corrected first, but I
do not have a clue as to what it should be.

Thanks again,
Andrew

Andrew

unread,
Jan 5, 2010, 3:07:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I received
the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error:


Run-time error '-2032465758 (86db08a2)':
Invalid container identifier.
And the GoBack macro line of "Application.ActiveWindow.Page =
Application.ActiveDocument.Pages.ItemU(LastPage)" is highligted in yellow.

I'm thinking I need to get the syntax of this line corrected first, but I
don't have a clue as to what it should be.

Thanks again,
Andrew

Andrew

unread,
Jan 5, 2010, 3:08:01 PM1/5/10
to

Andrew

unread,
Jan 5, 2010, 3:17:02 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I received
the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error:

Run-time error 2032465758 (86db08a2) Invalid container identifier.
And the primary line of the GoBack macro is highligted in yellow.

Andrew

unread,
Jan 5, 2010, 3:39:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user
is taken back to LastPage. However, I did try your suggestion. I receive

the same error, on the GoBack macro.

I get: Run-time error 2032465758 (86db08a2), Invalid container identfier,
and the main line of the GoBack macro is highlighted in yellow.

Andrew

unread,
Jan 5, 2010, 3:40:01 PM1/5/10
to
I'm not following you Paul.

WhatPage is the current page. When a user goes to a new page then LastPage
becomes the previous WhatPage. Then when the GoBack macro is run, then user

is taken back to LastPage. However, I did try your suggestion. I received

the same error, on the GoBack macro.

When I run the GoBack macro, I receive the following error:
Run-time error '-2032465758 (86db08a2)':
Invalid container identifier.


And the GoBack macro line of "Application.ActiveWindow.Page =

Application.ActiveDocument.Pages.ItemU(LastPage)" is highligted in yellow.

David J Parker [MVP Visio]

unread,
Jan 8, 2010, 4:23:02 PM1/8/10
to
Try this in the ThisDocument class

Option Explicit
Private WithEvents mwin As Visio.Window

Private LastPage As String

Public Sub StartListening()
Set mwin = Visio.ActiveWindow
End Sub

Public Sub GoBack()
Dim pageName As String
If Len(LastPage) > 0 Then
pageName = Visio.ActivePage.NameU
Visio.ActiveWindow.Page = LastPage
LastPage = pageName
End If
End Sub

Private Sub Document_DocumentOpened(ByVal doc As IVDocument)
StartListening
End Sub

Private Sub mwin_BeforeWindowPageTurn(ByVal Window As IVWindow)
LastPage = Window.Page.NameU
End Sub


"Andrew" <And...@discussions.microsoft.com> wrote in message

news:FB5B708A-6224-44EA...@microsoft.com...

0 new messages