Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save a copy of particular sheet minus VBA, CommandButton of parent workbook
Hi
Ok here is what I am trying to do. I have a workbook (with two sheets, one being the data sheet) that essentially prints an Invoice in triplicate and numbers them serially. What I want to do is to save a copy of the Sheet named 'Invoice' as a separate workbook in a sub folder, minus the macros and command button of the parent Sheet ("Invoice"), using VBA. SaveAs feature saves the data as well as the macros. I read Chip's article of deleting the VBA code through VBA, though it requires the VBA modules to be unprotected, plus involves setting all the client computer's Excel security ssetting to modified, which I am loath to do. Sheets("Invoice").Copy Above code does what I need, partially, in that it copies the data minus vba code (though it copies the activex command button as well). However I have no clue how to do following: 1. Save that new workbook with a file name (say invoice number) in a sub folder of current file. 2. Remove the CommandButton from the sheet. Can above be achieved from VBA code placed in the parent Workbook? Any help would be appreciated. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save a copy of particular sheet minus VBA, CommandButton of parent workbook
Dave
Regret the delayed reply.. could check the reply only today. This is to say thanks a lot. Your suggestion and code worked without any tweaks, other than setting the filename. It was simpler than removing code using vba. Thanks again ..better say thanks late than never :-) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parent child relation between two rows in an excel sheet | Excel Worksheet Functions | |||
How to copy data from a "parent sheet" to another | New Users to Excel | |||
VB Method to copy and save only one sheet of the active workbook | Excel Programming | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
Detect macro's parent workbook or worksheet | Excel Programming |