Solved

Remove all traces of VBA from workbook

Posted on 2011-09-26
11
244 Views
Last Modified: 2012-05-12
I have created an order form using excel 2010.  I am trying to make it relatively secure (accepting excels limitations) and usable in Excel 2010, Excel 2007, Excel 2003, Excel Mac 2008 and Excel Mac 2011.  I toyed with a macro to prevent copy and paste but gave up on that idea.  I went to reasonable lengths to remove all the code but it appears some may be left over.  Only when i open on a mac i get a message to enable or disable macros.  I have saved the file as .xls format.  If i save as an xlsx format i dont get that message so am a bit frustrated.  To recap:
I want to remove all code from file
I want to make it usable on various verions of excel
I want to protect it - any ideas welcome (other than standard protect sheet and workbook]
[The attached file has the password protection at workbook and worksheet level] ExampleFileNoMacros.xls
0
Comment
Question by:JohnNZExcel
  • 4
  • 3
  • 3
  • +1
11 Comments
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
Comment Utility
Hello,

without opening your workbook:

Use Excel 2007 or later and save the file as XLSX -- this will effectively remove all macro code.

Then save the XLSX file as a .xls file. If you get any warnings about compatibility issues, attend to them, then save again. Rinse and repeat until no more warnings arise.

Then the file should be fit to run on 2003 and higher, Windows or Mac.

cheers, teylyn
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
>> I want to protect it - any ideas welcome (other than standard protect sheet and workbook]

Protect it from what?
0
 
LVL 85

Expert Comment

by:Rory Archibald
Comment Utility
As soon as you add Excel 2008 into the mix, your options for anything other than built-in protection are pretty limited.
0
 

Author Comment

by:JohnNZExcel
Comment Utility
Thanks for your comments.  Teylyn i will try your idea now and keep you posted.

Re protection: i am trying to simply make it so users cannot do anything i dont want them to do.  Complete some simple text fields, pick items from a data validated list and thats it.
I have locked cells and protected the data entry sheet.  I have hidden 2 worksheets (with the lists and workings) and will then lock the workbook so these sheets cant be unhidden without a password. I

What i want to do is prevent users from accidentally doing something wrong.  I am not trying to stop a hacker.  Obviously with excel if someone who knows what they are doing wants to break the password and mess with validated cells and formula then they can with relative ease.
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
The approach you have taken should be sufficient to protect the workbook from accidental changes.

Run a few tests with your most ... erhmm ... "technologically challenged" users, and see if they break it. :))

cheers, teylyn
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:JohnNZExcel
Comment Utility
Thanks again Teylyn.  I did the conversion to xlsx and back to xls on my PC and it did not clean the code away when i opened it on my mac.  However, when i did the conversion to xlsx and back to xls on my mac it then worked fine on all machines including my excel 2003 machine.  Pretty happy with things at the moment.  I will close the question off in a couple of hours - thanks again for your contributions.
0
 
LVL 20

Expert Comment

by:clarkscott
Comment Utility
You could have just password protected the code.
Scott C
0
 
LVL 20

Expert Comment

by:clarkscott
Comment Utility
Developer - Project Explorer - single click on Project - right click and select PROJECT PROPERTIES - fill in the form and click OK.

Scott C
0
 
LVL 50

Expert Comment

by:teylyn
Comment Utility
Scott, as rorya has hinted above, any kind of code would not be an option for 2008 for Mac. That version does not do VBA at all.
0
 
LVL 20

Expert Comment

by:clarkscott
Comment Utility
Thanks,  I'm not a mac user.... have a good one!
Scott C
0
 

Author Closing Comment

by:JohnNZExcel
Comment Utility
Simple and effective solution - thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
EXCEL 2010 7 39
Vba to delete entire row 6 26
Excel VBA - copying formats 7 17
Excel filter by strike though 8 24
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now