+ Reply to Thread
Results 1 to 5 of 5

Auto open/close and update shared workbook

  1. #1
    Registered User
    Join Date
    03-05-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    3

    Auto open/close and update shared workbook

    Hello everyone,

    I'm looking for a 100% automated way to display a graph, in fullscreen mode on a projector. The graph is located in a tab of a bigger document and is updated frequently during the day by several persons.
    A new document is created every day, luckily with windows standard date formatting in the end, ex 2009-03-05 ( %date% )

    I have set up a dedicated PC to the projector that runs Excel 2003

    So far, i've only put this line in a .bat file

    "\\server\x\x\x\daily report %date%.xls"

    So i can at least open the right document every day with help of windows task scheduler..

    but I have a few problems here..
    • the right tab has to be opened.
    • I want to autosave every 15 minutes, to update the workbook
    • the tab containing the graph is to be viewed in fullscreen

    help, Anyone?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Auto open/close and update shared workbook

    Hi,

    1.
    Please Login or Register  to view this content.

    2.
    Please Login or Register  to view this content.
    3. The full screen is an Application level instruction, not a tab instruction.
    Please Login or Register  to view this content.
    If you just want the graph to display on it's own, you'd be better putting it on a Chart Sheet rather than having it embedded on an existing sheet.

    HTH
    Application.OnTime dTime + TimeValue("00:0:05"), "Autosave"
    ThisWorkbook.Save
    End Sub[/CODE]
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    03-05-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Auto open/close and update shared workbook

    Thanks!

    Only one thing though. How do i get this macro to initiate automatically?

    * The chart is in a chart sheet..

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Auto open/close and update shared workbook

    Hi,

    You could call it from the Workbook_Open event and leave it running.

    HTH

  5. #5
    Registered User
    Join Date
    03-05-2009
    Location
    Sweden
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Auto open/close and update shared workbook

    Ok here's how it ended.
    This script runs in the background.

    Sub Macro1()

    Dim TodaysDate As String

    TodaysDate = Format(Date, "yyyy")
    TodaysDate = TodaysDate & "-" & Format(Date, "mm")
    TodaysDate = TodaysDate & "-" & Format(Date, "dd")
    WorkbookShareLocation = "\\server\folder\folder\daily report "
    Workbook = "daily report "

    If Dir(WorkbookShareLocation & TodaysDate & ".xls") <> "" Then

    GoTo Start
    Else

    GoTo Waiting
    End If

    Start:

    Workbooks.Open (WorkbookShareLocation & TodaysDate & ".xls")
    Windows(Workbook & TodaysDate & ".xls").Activate
    Sheets("Diagram").Select
    Application.DisplayFullScreen = True
    ActiveChart.SizeWithWindow = True

    Waiting:

    Dim dTime As Date
    dTime = Time
    Application.OnTime dTime + TimeValue("00:15:00"), "Macro1"
    ActiveWorkbook.Save

    End Sub



    Thanks for helping out

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1