Move or copy sheet without including the code?

S

shiro

Hi All,
is it possible to programatically move or copy
the worksheet to internal/external workbook
*without* including the code behind the sheet.
 
H

Harlan Grove

shiro said:
is it possible to programatically move or copy
the worksheet to internal/external workbook
*without* including the code behind the sheet.

And without macros in general modules? Yes, you could use any
scripting language capable of Automation to automate Excel to copy or
move worksheets, but there'd be no way in Excel to trigger running
such scripts.
 
N

NoodNutt

G'day Shiro

One way would be to copy the entire sheet to a new WB as pasteSpecial.Value,
this ensures none of your code is present in the new WB, this is handy if
the end user only needs to see the data, and doesn't require access for
modification purposes.

As far as automation, Harlan is correct, regarding the triggering without
putting a code in the WS OnChange() event.

I would be more inclined to put the code behind a macro button on your WS to
trigger the process.

Go to this link and modify the code to suit your needs

http://www.rondebruin.nl/copy2.htm

Ron's website has other example code that will certainly help you.

HTH
Mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top