PC Review


Reply
Thread Tools Rate Thread

autoupdate macro

 
 
computers hate me
Guest
Posts: n/a
 
      5th Aug 2008
I have a spreadsheet that brings in data from another source.

The spreadsheet has a button that you press and it updates the data.The code
is under 'Micrososft Excel Objects' Sheet 1
Private Sub CommandButton2_Click()

Then on another Sheet I wrote a module called "calculations" that sorts
trough the data and does some calculations.

This takes a very long time to update so i want to set it up so that it
autoupdates at midnight everynight. so first it will update the spreadsheet
that brings in the info from another source then it will do the calculations
from my module.
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      5th Aug 2008
You may want to add the following at the beginning of your code
Application.ScreenUpdating = FALSE
Application.Calculation = XLCalculationManual

and at the end
Application.ScreenUpdating = TRUE
Application.Calculation = XLCalculationAutomatic

It may speed up execution.

--
HTH,
Barb Reinhardt



"computers hate me" wrote:

> I have a spreadsheet that brings in data from another source.
>
> The spreadsheet has a button that you press and it updates the data.The code
> is under 'Micrososft Excel Objects' Sheet 1
> Private Sub CommandButton2_Click()
>
> Then on another Sheet I wrote a module called "calculations" that sorts
> trough the data and does some calculations.
>
> This takes a very long time to update so i want to set it up so that it
> autoupdates at midnight everynight. so first it will update the spreadsheet
> that brings in the info from another source then it will do the calculations
> from my module.

 
Reply With Quote
 
computers hate me
Guest
Posts: n/a
 
      5th Aug 2008
We already tried that.

The module that i wrote calculates really quick. What takes forever is
bringing in the data from the other source. When i say forever i mean like 2
hours to update. this is because its ALOT of data it fills up the entire
worksheet.

Thats why the only thing that wethink we can do is to set it up to
autoupdate at night.

"Barb Reinhardt" wrote:

> You may want to add the following at the beginning of your code
> Application.ScreenUpdating = FALSE
> Application.Calculation = XLCalculationManual
>
> and at the end
> Application.ScreenUpdating = TRUE
> Application.Calculation = XLCalculationAutomatic
>
> It may speed up execution.
>
> --
> HTH,
> Barb Reinhardt
>
>
>
> "computers hate me" wrote:
>
> > I have a spreadsheet that brings in data from another source.
> >
> > The spreadsheet has a button that you press and it updates the data.The code
> > is under 'Micrososft Excel Objects' Sheet 1
> > Private Sub CommandButton2_Click()
> >
> > Then on another Sheet I wrote a module called "calculations" that sorts
> > trough the data and does some calculations.
> >
> > This takes a very long time to update so i want to set it up so that it
> > autoupdates at midnight everynight. so first it will update the spreadsheet
> > that brings in the info from another source then it will do the calculations
> > from my module.

 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      5th Aug 2008
OK, you're going to have to create an Workbook_Open macro that starts
everything up.

You'll also need to go to your task manager (CTRL ALT DEL) and under the
applications tab, add a new task. You can have it open your file at midnight
and the Workbook_Open macro will do it's stuff.

I've tried doing something similar, by my system sometimes reboots overnight
when it gets patches and things don't run as I expect.

Make sense?
--
HTH,
Barb Reinhardt



"computers hate me" wrote:

> We already tried that.
>
> The module that i wrote calculates really quick. What takes forever is
> bringing in the data from the other source. When i say forever i mean like 2
> hours to update. this is because its ALOT of data it fills up the entire
> worksheet.
>
> Thats why the only thing that wethink we can do is to set it up to
> autoupdate at night.
>
> "Barb Reinhardt" wrote:
>
> > You may want to add the following at the beginning of your code
> > Application.ScreenUpdating = FALSE
> > Application.Calculation = XLCalculationManual
> >
> > and at the end
> > Application.ScreenUpdating = TRUE
> > Application.Calculation = XLCalculationAutomatic
> >
> > It may speed up execution.
> >
> > --
> > HTH,
> > Barb Reinhardt
> >
> >
> >
> > "computers hate me" wrote:
> >
> > > I have a spreadsheet that brings in data from another source.
> > >
> > > The spreadsheet has a button that you press and it updates the data.The code
> > > is under 'Micrososft Excel Objects' Sheet 1
> > > Private Sub CommandButton2_Click()
> > >
> > > Then on another Sheet I wrote a module called "calculations" that sorts
> > > trough the data and does some calculations.
> > >
> > > This takes a very long time to update so i want to set it up so that it
> > > autoupdates at midnight everynight. so first it will update the spreadsheet
> > > that brings in the info from another source then it will do the calculations
> > > from my module.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: AutoUpdate =?Utf-8?B?Sm9lbA==?= Microsoft Excel Misc 0 17th Aug 2007 01:44 AM
HELP Autoupdate Jennie Windows XP Security 6 12th Nov 2005 06:15 AM
Help with autoupdate.... vcobra57 Microsoft Excel Worksheet Functions 0 11th Nov 2004 04:45 PM
Help with autoupdate.... vcobra57 Microsoft Excel Worksheet Functions 1 11th Nov 2004 04:36 PM
SP2 & AutoUpdate eblaster Windows XP General 3 23rd Aug 2004 03:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:59 PM.