Jump to content
  • 0

Recalculate worksheet command without clicking on worksheet?


SCParker

Question

3 answers to this question

Recommended Posts

  • 0

As far as I know there's no built in command. You can write a script to do it though. I've got one to recalculate all worksheets in a file, but you could modify it to do just one specific instance by name. Vectorscript below. I set it up as a Plugin so I could make it a custom menu item. I borrowed and adapted this from someone else's work, so it's possible it could be simplified. Hope this helps.

 

-Dan

 

{Recalculate all worksheets in file}
Procedure WSrecalc;
VAR

foundObject: handle;
objname :String;
i, n : integer;
OK : boolean;

function DoRecalc (h : handle) : Boolean;

BEGIN
	RECALCULATEWS(h);
	RESETOBJECT(h);
	RESETOBJECT(GETWSIMAGE(h));
End;

Begin
n := NAMENUM;
	For i := 1 to n do begin
		foundObject := GETOBJECT(NAMELIST(I));
		If GETTYPE(foundObject) = 18 Then ok := DoRecalc(foundObject);
	End;
End;
Run (WSrecalc);

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...