Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to password protect an 2007 workbook without show readonly opt

Hi All,

I'm trying to set a password on a workbook using PIAs 2007, the problem is
when opening that workbook, a promot opens asking for a password and a
readonly button, i want to get rid of that readonly button and just protect
the workbook from opening without a password?



Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to password protect an 2007 workbook without show readonly opt

Hi Yazeed

If you set the protection you have a option to use read only or not

Use only the password to open in the dialog and it will work like you want

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yazeed" wrote in message ...
Hi All,

I'm trying to set a password on a workbook using PIAs 2007, the problem is
when opening that workbook, a promot opens asking for a password and a
readonly button, i want to get rid of that readonly button and just protect
the workbook from opening without a password?



Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to password protect an 2007 workbook without show readonly

Hi Ron,

Thank for you input, even though its not working, here is a code snippet:

Workbook.SaveAs("test.xlsx", , Type.Missing, "123", false, false,
Type.Missing, XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);

This will save the workbook with a password, but when you open the workbook
manually(not through the code) the promot appears to enter the password along
with that READONLY button.

"Ron de Bruin" wrote:

Hi Yazeed

If you set the protection you have a option to use read only or not

Use only the password to open in the dialog and it will work like you want

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yazeed" wrote in message ...
Hi All,

I'm trying to set a password on a workbook using PIAs 2007, the problem is
when opening that workbook, a promot opens asking for a password and a
readonly button, i want to get rid of that readonly button and just protect
the workbook from opening without a password?



Thanks in advance


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to password protect an 2007 workbook without show readonly

Oops you posted in programming

I have no problem when I use this

ActiveWorkbook.SaveAs Filename:="test.xlsx", FileFormat:=51, Password:="123"

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yazeed" wrote in message ...
Hi Ron,

Thank for you input, even though its not working, here is a code snippet:

Workbook.SaveAs("test.xlsx", , Type.Missing, "123", false, false,
Type.Missing, XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);

This will save the workbook with a password, but when you open the workbook
manually(not through the code) the promot appears to enter the password along
with that READONLY button.

"Ron de Bruin" wrote:

Hi Yazeed

If you set the protection you have a option to use read only or not

Use only the password to open in the dialog and it will work like you want

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Yazeed" wrote in message ...
Hi All,

I'm trying to set a password on a workbook using PIAs 2007, the problem is
when opening that workbook, a promot opens asking for a password and a
readonly button, i want to get rid of that readonly button and just protect
the workbook from opening without a password?



Thanks in advance


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
How to remove password protect to open Excel 2007 workbook JoWrobs Excel Discussion (Misc queries) 3 February 4th 10 11:18 PM
Password Protect - put password in a cell in the workbook Mike R. Excel Programming 2 September 1st 06 06:29 AM
disabling readonly(protect on worksheet) using vba tweety127[_13_] Excel Programming 1 June 2nd 06 10:13 AM
How do I use VC++6.0 to protect a excel file to readonly gowinder Excel Programming 2 September 22nd 05 02:18 AM
How do I use VC++6.0 to protect a excel file to readonly gowinder Excel Worksheet Functions 1 September 22nd 05 02:16 AM


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

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

About Us

"It's about Microsoft Excel"