ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to automatically sellect 'No' in dialog box (https://www.excelbanter.com/excel-discussion-misc-queries/229100-macro-automatically-sellect-no-dialog-box.html)

ARbitOUR[_2_]

Macro to automatically sellect 'No' in dialog box
 

Hi all!

I'm busy creating a macro to automatically update certain values, text
and cell formats etc. once it is run. The workbook to be updated, as
well as the workbook containing the update values are both password
protected. Both workbooks are saved with the option enabled to recommend
read-only upon opening them upon which the end-user has the option of
selection either 'Yes' or 'No' . I need an entry in my macro that will
automatically select the 'No' option, thereby opening the workbook in an
editable state.

Any help will be appreciated!


--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile: http://www.thecodecage.com/forumz/member.php?userid=254
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90781


Jacob Skaria

Macro to automatically sellect 'No' in dialog box
 
The below link would be helpful..

http://www.ozgrid.com/forum/showthread.php?t=39251
--
If this post helps click Yes
---------------
Jacob Skaria


"ARbitOUR" wrote:


Hi all!

I'm busy creating a macro to automatically update certain values, text
and cell formats etc. once it is run. The workbook to be updated, as
well as the workbook containing the update values are both password
protected. Both workbooks are saved with the option enabled to recommend
read-only upon opening them upon which the end-user has the option of
selection either 'Yes' or 'No' . I need an entry in my macro that will
automatically select the 'No' option, thereby opening the workbook in an
editable state.

Any help will be appreciated!


--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile: http://www.thecodecage.com/forumz/member.php?userid=254
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90781



Dave Peterson

Macro to automatically sellect 'No' in dialog box
 
There are a couple of passwords (to open and to update) that could be
specified. But the parm you're looking for is "ignorereadonlyrecommended"

Dim wkbk as workbook

set wkbk = Workbooks.Open Filename:="C:\book1.xls", Password:="a", _
writerespassword:="b", ignorereadonlyrecommended:=True

I bet you're not using the writerespassword. So delete that.


ARbitOUR wrote:

Hi all!

I'm busy creating a macro to automatically update certain values, text
and cell formats etc. once it is run. The workbook to be updated, as
well as the workbook containing the update values are both password
protected. Both workbooks are saved with the option enabled to recommend
read-only upon opening them upon which the end-user has the option of
selection either 'Yes' or 'No' . I need an entry in my macro that will
automatically select the 'No' option, thereby opening the workbook in an
editable state.

Any help will be appreciated!

--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile: http://www.thecodecage.com/forumz/member.php?userid=254
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90781


--

Dave Peterson

ARbitOUR[_3_]

Macro to automatically sellect 'No' in dialog box
 

Thx for the reply!

Unfortunately the link you have forwarded only provides code to open
the workbook in a 'read-only' state. I actually wish to do the opposite:
The default action for the workbook is to prompt the user (Y/N)
regarding read-only when he opens the workbook. However, the 'Automatic
update' macro I'm trying to create should automatically open the
workbook in its non-default state (i.e. a read-write state). In other
words, when the user manually opens the workbook it will provide the
read only prompt, but when the workbook is opened using this 'Update'
macro (situated in a different workbook), the workbook to be updated
must open in the read-write state.

Any help would be helpful!
(cliche...lol)


--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile: http://www.thecodecage.com/forumz/member.php?userid=254
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90781


ARbitOUR[_4_]

Macro to automatically sellect 'No' in dialog box
 

Thx Dave!!
That helped...
:)


--
ARbitOUR
------------------------------------------------------------------------
ARbitOUR's Profile: http://www.thecodecage.com/forumz/member.php?userid=254
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90781



All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com