program excel run procedure
RH

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Program Excel to run a procedure several days in a row

Program Excel to run a procedure several days in a row

resolvedResolved · Medium Priority · Version 2010

Alain has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Access Introduction course
Access Intermediate course
Access Advanced course
Access VBA course
Introduction to Management course

Program Excel to run a procedure several days in a row

Hi,

First of all I wish you a happy New Year.

I woud like to run an Excel application that is called REC_FORWARD_FX_EXPOSURE each morning. I use the following bit of code that I put in the module "ThisWorkbook" of the PERSONAL.XLSB file.

Private Sub Workbook_Open()

Application.OnTime TimeValue("06:00:00"), "REC_FORWARD_FX_EXPOSURE"

End Sub

In order to have this work I keep Excel open and do not shut down my computer when leaving the office in the evening. This procedure works very well but is run only once the next day. Therefore when I am off the application is run only once and no longer on a daily basis.

I would like to know how I could program Excel to execute it every day, that is to say several days in a row without closing and reopening Excel. Could you please suggest a solution?

I thank you in advance for your help.

Alain

RE: Program Excel to run a procedure several days in a row

Hi Alain

Happy New Year to you and thanks for the post. We have certainly scratched our heads over this.

What we can say is that if a solution is available it will be something we need to look at beyond this forum.

This will be consutlancy work to research and design a solution for you with associated costs. If you would like to progress this please reply to my email.

Kind regards

Jacob

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Use RANDBETWEEN to generate random numbers

There may be occassions where you need to generate random numbers in your spreadsheet. Use the RANDBETWEEN function to generate random numbers between two values that you specify.

The function looks like this:

=randbetween(LOW,HIGH)

where LOW is the lowest number you want generated; and HIGH is the highest number you want generated.

This formula will work with both positive and negative LOWs and HIGHs. Also it will only generate integer numbers unless forced to do otherwise by the following:

=randbetween(LOW*10^PRECISION,
HIGH*10^PRECISION)/(10^PRECISION).

where PRECISION represents the levels of decimal precision needed (i.e. if you need numbers with one decimal place, PRECISION would be 1; 2 for two decimal places and so on).

One final note, if the RANDBETWEEN formula does not work in your spreadsheet or returns a "#NAME" error, you need to install the Analysis Toolpak Add-In. You will need to press F2 then Enter following the installation.

View all Excel hints and tips


Server loaded in 0.05 secs.