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
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...
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/
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
Is there any keyboard or mouse commands that can be used for Forward and
Back when in Full Screen view?
Thanks in advance,
Andrew
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
>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
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
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
Thanks again,
Andrew
"Paul Herber" wrote:
> .
>
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:
> .
>
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
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
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.
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.
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.
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...