cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to get a program run just only when the worksheet is opened

SOLVED
Newbie

how to get a program run just only when the worksheet is opened

Hi Friends,

Is there anybody knows that how to get a program run just only when the worksheet is opened?

There are some codes in the TextBox control in the test.xmcd file. When I press Ctrl+F9 button, all the code will be executed again. In fact, I just want them to be executed when I open the worksheet, and then do not let them run even when I press the Ctrl+F9 button.

As we know, this function is easy to realized in Excel. Can it be implemented in Mathcad?

Thanks and Best Regards.

Jeffery

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to get a program run just only when the worksheet is opened

Jeffery Gu wrote:

Hi Friends,

Is there anybody knows that how to get a program run just only when the worksheet is opened?

There are some codes in the TextBox control in the test.xmcd file. When I press Ctrl+F9 button, all the code will be executed again. In fact, I just want them to be executed when I open the worksheet, and then do not let them run even when I press the Ctrl+F9 button.

As we know, this function is easy to realized in Excel. Can it be implemented in Mathcad?

Thanks and Best Regards.

Jeffery

Try the attached. It has some code to detect first time of running and then avoids running the 'start' code if it's already happened.

Stuart

3 REPLIES 3

Re: how to get a program run just only when the worksheet is opened

Jeffery Gu wrote:

Hi Friends,

Is there anybody knows that how to get a program run just only when the worksheet is opened?

There are some codes in the TextBox control in the test.xmcd file. When I press Ctrl+F9 button, all the code will be executed again. In fact, I just want them to be executed when I open the worksheet, and then do not let them run even when I press the Ctrl+F9 button.

As we know, this function is easy to realized in Excel. Can it be implemented in Mathcad?

Thanks and Best Regards.

Jeffery

Try the attached. It has some code to detect first time of running and then avoids running the 'start' code if it's already happened.

Stuart

Highlighted

Re: how to get a program run just only when the worksheet is opened

Hi Stuart,

Thanks very much.

Regards.

Jeffery

Re: how to get a program run just only when the worksheet is opened

Jeffery Gu wrote:

Hi Stuart,

Thanks very much.

Regards.

Jeffery

No worries, Jeffery.