Copy sheet without Code

X

xcelion

Hi All,

Iam newbie to excel programming . I have a sheet with a command button
and code associated with command button written in the sheet itself.(Ie
not using any module).I want to make a copy of this sheet without this
command button and and associated code, using VBA .IS this possible.Any
help would be gr8
Thanks in advance


Xcelion
 
J

Jim Thomlinson

How important is it to you that the code be removed (this is a little tricky.
Possible but tricky for a newbie). You can just change the visible property
of the button and everything is good to go. The button will be invisible and
no one will know it is there.
 
S

STEVE BELL

This worked in Excel 2000

Sheets("sheet1").Cells().Copy _
Destination:=Sheets("sheet3").Range("A1")

Left the command button on Sheet1 and didn't copy it to Sheet2.
The only code in sheet2, will be stuff you put in after...

use workbook references if you want to copy from one workbook to another.
 
X

xcelion

Thanks Steve and Jim

Thanks a lot for your suggestions.I will be very helpful for newbie
like me.

:)
 

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