News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Excel 2007 Desktop Shortcut to Specfic Worksheet Problem

    Posted on Bill_Bright Comment on the AskWoody Lounge

    Home Forums AskWoody support Microsoft Office by version Office 2010 and earlier for PC Excel 2007 Desktop Shortcut to Specfic Worksheet Problem

    This topic contains 0 replies, has 1 voice, and was last updated by

     Bill_Bright 1 year, 11 months ago.

    • Author
      Posts
    • #119460 Reply

      Bill_Bright
      AskWoody Lounger

      I have a large Excel 2007 workbook. There is a specific worksheet in that workbook called “Router logs” I update every day. I wanted a way to click on a shortcut and open the workbook to that specific worksheet. So with a little help from my friend Bing Google, IĀ  created a file called router logs.vbs that contains the following:

      Dim xlApp
      Dim wbkTemp

      Set xlApp = CreateObject(“Excel.Application”)
      Set wbkTemp= xlApp.Workbooks.Open(“C:\Users\billb\Documents\Forum Stuff\On-Line Spreadsheets.xlsx”)
      wbkTemp.Worksheets(“Router Logs”).Activate
      xlApp.Visible = True

      When I click on that .vbs file, Excel opens to the correct sheet as expected. šŸ™‚ I have created a shortcut to that .vbs file and when I click on the shortcut, Excel opens to the correct sheet as expected. šŸ™‚ Note my worksheet opens in the foreground and that window has “focus” – just as expected.

      BUT – If I move/copy either the .vbs file or shortcut to my desktop, they still work EXCEPT when I click on the .vbs or shortcut icon, my spreadsheet opens up behind all other open windows and without focus. šŸ™

      Other desktops item open in the foreground with focus just fine.

      I have a second shortcut to the entire Excel Workbook on my desktop and when I click that, the workbook opens in the foreground and with focus just fine (except always to the last worksheet accessed). It is only when trying to open the workbook to that specific Router Logs worksheet that this piddly but very annoying behavior occurs.

      As a hardware tech, I don’t know enough to tell if is a .vbs, Excel or Windows problem, or how to fix it. But since other shortcuts work as expected, I don’t suspect Windows. Any help would be appreciated.

      Fully updated 64-bit W10 Pro.

      Bill (AFE7Ret)
      Freedom isn't free!

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Excel 2007 Desktop Shortcut to Specfic Worksheet Problem

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.