User Profile

Collapse

Profile Sidebar

Collapse
Onthefly
Onthefly
Last Activity: Oct 30 '06, 06:45 PM
Joined: Sep 26 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Onthefly
    started a topic Loop

    Loop

    Hey,

    Can someone help me figure out how to make this code loop so that it saves my worksheet every 24 hours:

    Private Sub Workbook_Open()
    'This will run the code 1 minute after the worksheet is opened
    Application.OnT ime Now + TimeValue("24:0 0:00"), "SaveData", , True
    End Sub

    Onthefly
    See more | Go to post

  • Onthefly
    replied to Run SQL Query, then Save
    Quick question, will this loop the time so it saves it every day at the same time without me having to re-open this?

    I'm glad you learned as well. The cool thing about this set up is that I now have about 25 excel reports that automatically update themselves every day/week/month and e-mail themselves to the business owners at a specified time, so I don't have to touch them.
    See more | Go to post

    Leave a comment:


  • Onthefly
    replied to Run SQL Query, then Save
    This is awesome, it works perfectly!

    Thanks!
    See more | Go to post

    Leave a comment:


  • Onthefly
    replied to Run SQL Query, then Save
    Hey, I think this will work! But I must be missing something because as it tries to save I get this error:

    The Macro:"C:Docume nts and Settings\....'! SaveData' cannot be found.

    Sorry, I am fairly new with VB so I am probably missing something simple.. any idea?
    See more | Go to post

    Leave a comment:


  • Onthefly
    replied to Run SQL Query, then Save
    Actually I have it the other way around. I have an excel spreadsheet that is pulling info from my MS SQL database everynight and posting the results in the spreadsheet (and it erases the results that were their the day before). So my question is, how do I then save the changes from the new query after the update took place so I can e-mail out the new figures.
    Thanks for your help by the way....
    See more | Go to post

    Leave a comment:


  • Onthefly
    replied to Run SQL Query, then Save
    That is what I originally tried, and it works but the autosave feature saves it as an .xar file and it saves it like a hidden file which prevents my re-occurring e-mail software program from recognizing it. Using the Autosave feature would be my first choice if I could figure out a way around this issue.
    See more | Go to post

    Leave a comment:


  • Onthefly
    started a topic Run SQL Query, then Save

    Run SQL Query, then Save

    I am trying to automate an excel report so that it automatically posts a SQL query then saves the file every 24 hours. Currently I can do one or the other (post sql or save) but I cannot run both at the same time.

    So far, I have an ODBC connection between my excel file and my MS SQL database and have the SQL queries refreshing every 1440 minutes.

    I also have a VB timer set to run every 24 hours to save the workbook...
    See more | Go to post
No activity results to display
Show More
Working...