Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: Macro to open password protected workbook..

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Andy Devine
    Posts
    106
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hi
    what code do i need to get a macro to open a password protected workbook if password to open is say "123"?
    thanks
    Andy

    Andy Devine

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-30 01:14, Andy D 2002 wrote:
    hi
    what code do i need to get a macro to open a password protected workbook if password to open is say "123"?
    thanks
    Andy

    Andy try
    Workbooks.Open Filename:="C:NavKeys.xls", password:="123"


    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    New Member
    Join Date
    May 2012
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    hi I am not familliar on using vb code. can you please help me whats the whole code ? that I can use to open password protected workbook

  4. #4
    Board Regular
    Join Date
    Feb 2011
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Press Alt+F11 and then add module & then write

    Sub open_file ()
    Workbooks.Open Filename:="C:NavKeys.xls", password:="123"
    End sub

  5. #5
    New Member
    Join Date
    May 2012
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    thanks for the response I'll try it now

  6. #6
    New Member
    Join Date
    May 2012
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Quote Originally Posted by noori View Post
    Press Alt+F11 and then add module & then write

    Sub open_file ()
    Workbooks.Open Filename:="C:NavKeys.xls", password:="123"
    End sub

    Hi its still not working , the file name of this excel is HELLO so I change Navkeys to Hello, but still not working . If its possible can you just send me the excel file that I can use . Sorry I am really dumb on this I just need this excel file ..

  7. #7
    Board Regular
    Join Date
    Apr 2012
    Posts
    455
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Hello,
    Filename:="C:\HELLO.xls" (you need to write the path and the name of your file)

  8. #8
    New Member
    Join Date
    May 2012
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Quote Originally Posted by andrewkard View Post
    Hello,
    Filename:="C:\HELLO.xls" (you need to write the path and the name of your file)
    Hi Andrew I did the same thing but it still not working.. please help me with the file. If you can pls send me the excel workbook with the code here is my email sasukeshane@hotmail.com ..

    thanks I really need help

  9. #9
    Board Regular
    Join Date
    Feb 2011
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Try now

    Sub open_file ()
    Workbooks.Open Filename:="C:\Hello.xls", password:="123"
    End sub

  10. #10
    New Member
    Join Date
    May 2012
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro to open password protected workbook..

    Quote Originally Posted by noori View Post
    Try now

    Sub open_file ()
    Workbooks.Open Filename:="C:\Hello.xls", password:="123"
    End sub
    Still not working

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •