Solved

Excel Worksheets

Posted on 1998-10-03
7
355 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
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 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