Results 1 to 2 of 2

Thread: passing argument to workbooks.password

  1. #1
    Board Regular
    Join Date
    Mar 2016
    Posts
    1,391
    Post Thanks / Like
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)

    Default passing argument to workbooks.password

    Hi
    I was reading the article below and then tried the code below by myself. Not sure why the code below works! password is a function and I want to pass 1 to that function. so I expected to do these (the password is 1)

    workbooks(1).password "1"
    OR
    workbooks(1).password 1

    ++++++
    Sub mypassword()
    Workbooks(1).Password = 1
    End Sub

  2. #2
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    33,815
    Post Thanks / Like
    Mentioned
    48 Post(s)
    Tagged
    6 Thread(s)

    Default Re: passing argument to workbooks.password

    Password is a property.

Some videos you may like

User Tag List

Tags for this Thread

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
  •