Results 1 to 5 of 5
  1. #1
    Buns1976 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    16

    Link to a specific sheet in Excel workbook

    Hello,



    I have a button in an Access form which opens an Excel workbook with an On Click [Event Procedure]. Is there a way to open a specific sheet within that workbook such as Sheet2? Also would it make a difference
    if that sheet is hidden?

    Thanks,
    D


    Code:
    Shell "EXCEL.EXE C:\Users\HOME\OneDrive\Documents\LOTTERY\[Book1.xlsx]"

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Yes, it matters. A hidden sheet cannot be activated.

    AFAIK, there is no switch to specify worksheet anyway.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I believe if you select your sheet and then save the workbook, it will open to that sheet the next time.?
    Best to use automation I would have thought?, then you could unhide sheet if hidden, and select it.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  4. #4
    Buns1976 is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2019
    Posts
    16
    Welshgasman that is true however there are other situations that warrant the workbook to open to other specific pages.

  5. #5
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    there are other situations that warrant the workbook to open to other specific pages.
    What does that matter? You use automation as suggested and either unhide or not, then activate (or not) the sheet you want?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 02-24-2016, 02:33 PM
  2. Replies: 6
    Last Post: 01-29-2015, 08:53 PM
  3. Replies: 1
    Last Post: 08-08-2013, 03:54 PM
  4. Replies: 2
    Last Post: 08-14-2012, 04:24 AM
  5. Link to Excel Workbook
    By Shelly9633 in forum Access
    Replies: 2
    Last Post: 01-06-2012, 10:43 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums