Consulting

Results 1 to 3 of 3

Thread: Change active page of Vision object in Excel

  1. #1

    Change active page of Vision object in Excel

    I have an Excel document in which I inserted Visio object. It has a few pages, each page has a specific model and according to some checkboxes in excel I want to choose a specific page, so when I print the excel, it will have specific model from visio. All this should do via VBA code that will be trigered by checkmark. The Vision object is embeded in excel, I dont want to link an external document. So far I managed to activate the visio object, with this code:
    Set visioObj = Worksheets("Document").OLEObjects("objekt 4")
    visioObj.Activate
    But I can't figure out, how to change the active page.
    Do you have any idea how to do that?
    Thank you.
    Last edited by Aussiebear; 01-27-2023 at 12:55 PM. Reason: Added code tags to supplied code

  2. #2
    Found the solution, needed to use:
    visioObj.Object.Application.ActiveWindow.Page = vsPage

  3. #3
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Thank you for posting the solution
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •