Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Put password for excel file in VB code

Hello,
I open two new work books named as work book 1 and work book 2. i feed
some data in work book 1 and in work book i used one formula that is
=A1 from work book 1 and enter that value entered in work book. if put
password for work book 1 and save it and after that i open work book
2 that file ask update link or password to open the file. i just want
to ask the question is can it possible i put my password in VB code
because when i open my excel file that time never ask for password.or
i protect my only my VB coding.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Put password for excel file in VB code


Hi,

Try this

Workbooks.Open "C:\book2.xls", Password:="MyPass"

Mike

"NANA" wrote:

Hello,
I open two new work books named as work book 1 and work book 2. i feed
some data in work book 1 and in work book i used one formula that is
=A1 from work book 1 and enter that value entered in work book. if put
password for work book 1 and save it and after that i open work book
2 that file ask update link or password to open the file. i just want
to ask the question is can it possible i put my password in VB code
because when i open my excel file that time never ask for password.or
i protect my only my VB coding.

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
PASSWORD REMOVAL I have the password to open the file and the password to modify the file now how to remove them LJ[_4_] Excel Programming 0 April 27th 06 03:18 AM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
macro code to change file-opening password arunjoshi[_18_] Excel Programming 1 June 16th 05 08:49 AM
Include password in VBA code to open file problem PaulC Excel Programming 0 November 3rd 04 06:58 PM
Include password in VBA code to open file problem PaulC Excel Programming 1 November 2nd 04 01:24 AM


All times are GMT +1. The time now is 04:29 PM.

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"