The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Edit-Delete in a script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

a_user

USA
0 Posts

Posted - 08/13/1998 :  7:44:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
The menu item 'Delete' in the Edit Menu is a quite powerful tool. It
not only deletes the contents of the selected cells, but also
reduces the length of the coloumn. If one deletes some cells in the
middle of a coloumn, the rest of the coloumn is moved upwards.

But how can I use this tool in a script? It is not difficult to delete the
contents of one or more cells, but if I want to move the rest of coloumn
upwards I have to write a little copy-loop. Does anybody know a better
solution?

a_user

USA
0 Posts

Posted - 08/13/1998 :  7:46:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Response

This particular menu item does not have a script command. However, by using
script, one can invoke the menu command.

Select the cell(s) that you want to delete, either manually, or using script.

For example:
worksheet -s 1 3 1 5; /* Select rows 3 to 5 in column 1 */

then invoke the menu command

domenu 881; /* Call the Delete menu by its ID number */

Note that using IDs is not recommended for future-compatible code, since
Origin's menu IDs may change at some future point.

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000