Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Accesing vba project from wb that has vba project password protected

Hello all,

I have a few number of excel templates that are to contain the same vb
modules. The difference between them is just in presentation. Whe
updating the code in one template, this should be reflected in th
other templates. I have tried to write a vb program to export the vb
modules from the master template and then import into the others. Th
problem is that they all have a password set to lock the vba project.
Hence when I try to access the associated vba projec
(wb.vbprofect.vbcomponents("Module1").Export) are get an error as th
vb project is password protected. I know the password, so is ther
anyway of programmatically passing the password so as to open th
vbproject? Maybe through the .VBE object?

Thanks for any help you can offer!!

Cheers,

Richar

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Accesing vba project from wb that has vba project password protected

I think the closest you'll get is the unreliable SendKeys.



"cassidyr1 <" wrote:

Hello all,

I have a few number of excel templates that are to contain the same vba
modules. The difference between them is just in presentation. When
updating the code in one template, this should be reflected in the
other templates. I have tried to write a vb program to export the vba
modules from the master template and then import into the others. The
problem is that they all have a password set to lock the vba project.
Hence when I try to access the associated vba project
(wb.vbprofect.vbcomponents("Module1").Export) are get an error as the
vb project is password protected. I know the password, so is there
anyway of programmatically passing the password so as to open the
vbproject? Maybe through the .VBE object?

Thanks for any help you can offer!!

Cheers,

Richard

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Accesing vba project from wb that has vba project password protected

instead of having the same code reside in many templates
why not make 1 addin with all the code?

an addin is made very simply:
saveas = select addin (.xla) = save it.

you'll need to setup a user interface (toolbar menu)
as macro's in an addin do not appear in the Macro dialogs.

While developing you can toggle the workbook.Isaddin property
to hide / unhide the workbook.

copy the addin to the server and all your users and templates can work
with it. in VBE's immediate pane:type ?application.librarypath to find
the correct location.




keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


cassidyr1 wrote:

Hello all,

I have a few number of excel templates that are to contain the same

vba
modules. The difference between them is just in presentation. When
updating the code in one template, this should be reflected in the
other templates. I have tried to write a vb program to export the

vba
modules from the master template and then import into the others. The
problem is that they all have a password set to lock the vba project.
Hence when I try to access the associated vba project
(wb.vbprofect.vbcomponents("Module1").Export) are get an error as the
vb project is password protected. I know the password, so is there
anyway of programmatically passing the password so as to open the
vbproject? Maybe through the .VBE object?

Thanks for any help you can offer!!

Cheers,

Richard


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
protected project ana Excel Discussion (Misc queries) 0 September 14th 07 01:04 AM
VBA project is protected Ltat42a Excel Discussion (Misc queries) 0 February 5th 06 08:32 PM
Password protected VBA project Tomasz Klim New Users to Excel 1 October 12th 05 06:02 PM
Excell VBA Project Password? Martin Excel Discussion (Misc queries) 2 June 11th 05 12:52 AM
Forgot Project Password Joe Excel Programming 2 May 14th 04 04:50 PM


All times are GMT +1. The time now is 08:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"