Jump to content

Recommended Posts

Posted

I have the following problem.

I want to list the macros of an Excel workbook in a listbox of Autoit. So the user may choose a macro for starting it.

How is it possible?

Thanks!

Mike32

Posted

@ Juvigy

Thx for your answer.

I have tested the code. On line 4 ($oModules = $oExcel.ActiveWorkbook.VBProject.VBComponents) there will be an error. Auoit doesn't work and will stop there.

Does your code work with your 2010.xls?

In my workbook there is the modul "Modul1" with 6 macros.

Thx

Greetings

Mike32

Posted

@Juvigy

You are right. It was my mistake. :x

The VBProject has a password. Is it possible to unlock the VBproject and to lock it later with Autoit3 when you know the password?

Thx

Greetings

Mike32

Posted

Not sure. Most likely No. Try those :

ActiveWorkbook.VBProject.Protection ;Read only property

ActiveWorkbook.Unprotect (Password) ;most likely just for excel wb not VB.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...