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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

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

JefferyGu
1-Visitor

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

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:JefferyGu)

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

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald III
(To:JefferyGu)

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

Hi Stuart,

Thanks very much.

Regards.

Jeffery

StuartBruff
23-Emerald III
(To:JefferyGu)

Jeffery Gu wrote:

Hi Stuart,

Thanks very much.

Regards.

Jeffery

No worries, Jeffery.

Announcements

Top Tags