Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default autoupdate macro

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default autoupdate macro

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default autoupdate macro

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default autoupdate macro

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoUpdate Danny Excel Discussion (Misc queries) 0 August 17th 07 02:07 AM
AutoUpdate Joel Excel Discussion (Misc queries) 0 August 17th 07 01:44 AM
Help with autoupdate.... vcobra57[_2_] Excel Programming 0 November 11th 04 06:54 PM
Help with autoupdate.... vcobra57 Excel Worksheet Functions 0 November 11th 04 04:45 PM
Help with autoupdate.... vcobra57 Excel Worksheet Functions 1 November 11th 04 04:36 PM


All times are GMT +1. The time now is 04:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"