Solved

Excel Worksheets

Posted on 1998-10-03
7
356 Views
Last Modified: 2010-04-30
I created a security system on an excel worksheet.
I protected the worksheet VBA modules with a password.
I then changed the security system.
I now have to go and update every single worksheet to work with the new system.

The security system was a macro in Excel.
Is it possible to , with VB, edit Excel Modules through a program?

eg: change the actual source code in the Excel macro through and external Visual Basic Program?
0
Comment
Question by:bobbyo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 2

Accepted Solution

by:
PedroMVGomes earned 100 total points
ID: 1437935
Yes it is possible, in you references menu add a reference for E xcel 8 (File Excel8.Olb) and voila, you have access to do almost anything in Excel.

You get the application object, the module and colection the workbook object and colection, the worksheet object and colection and a lot more.

You can Open a existing workbook change it and then save it
0
 
LVL 1

Author Comment

by:bobbyo
ID: 1437936
It is not satisfactory, just need a little more information.

Can you change the Module code in the macros this way?
0
 
LVL 2

Expert Comment

by:PedroMVGomes
ID: 1437937
yes, the module object exposes everything you need, you can even run a macro, or change the format of a particular cell in a particular worksheet
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 1

Author Comment

by:bobbyo
ID: 1437938
How will I edit the code in the Excel Macro?
0
 
LVL 1

Author Comment

by:bobbyo
ID: 1437939
Sorry, how will I edit the code in the Excel Macro, through a Visual Basic Program?
0
 
LVL 2

Expert Comment

by:PedroMVGomes
ID: 1437940
Send me your e-mail and i will send you a sample project with a simple macro in a excel file.
0
 
LVL 1

Author Comment

by:bobbyo
ID: 1437941
mota@icon.co.za
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 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