Solved

Excel Worksheets

Posted on 1998-10-03
7
351 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

705 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

14 Experts available now in Live!

Get 1:1 Help Now