Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save data without code...

I have a workbook with a lot of code in modules and userforms. This code is
protected with password but I would like the user can´t save it with the
data. Is there an option to save only the data in the sheet without the
code.
Thanks



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Save data without code...

You have to create a new workbook and copy the worksheets.

First = True
for each sht in thisworkbook.sheets
if First = True then
'copy sheet to create new workbook
sht.Copy
set newbk = activeworkbook
First = False
else
sht.copy after:=newbk.sheets(newbk.sheets.count)
end if
next sht
newbk.saveas filename = ABC.XLS
newbk.close


next


"Juan GarcÃ*a" wrote:

I have a workbook with a lot of code in modules and userforms. This code is
protected with password but I would like the user can´t save it with the
data. Is there an option to save only the data in the sheet without the
code.
Thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can i save activeworkbook to binary data before save ? badtoto Excel Programming 0 April 14th 08 02:32 AM
Modifying code to save data Constantly Amazed Excel Programming 4 November 19th 07 07:35 PM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM
Placing a code before Save & Save As Alex Martinez Excel Programming 1 September 27th 05 06:35 AM
VBA code gets lost from workbook if I paste in new data and save??? Lonnie[_3_] Excel Programming 1 April 8th 04 05:49 PM


All times are GMT +1. The time now is 05:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"