AllInternalPasswords.xls

This code was posted here sometimes ago to recover Excel passwords.
I am using XL97 and Win95.
When trying to run it it gets to line:

    WinTag = .ProtectStructure Or .ProtectWindows

and gives runtime error 91 

Object variable or With block variable not set.

Can someone help to undertand why and how to fix that?

_________________________________________________________________
Option Explicit

Public Sub AllInternalPasswords()
    ' Breaks worksheet and workbook structure passwords. Bob McCormick
    '  probably originator of base code algorithm modified for
coverage
    '  of workbook structure / windows passwords and for multiple
passwords
    '
    ' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
    ' Modified 2003-Apr-04 by JEM: All msgs to constants, and
    '   eliminate one Exit Sub (Version 1.1.1)
    ' Reveals hashed passwords NOT original passwords
    Const DBLSPACE As String = vbNewLine & vbNewLine
    Const AUTHORS As String = DBLSPACE & vbNewLine & _
            "Adapted from Bob McCormick base code by " & _
            "Norman Harker and JE McGimpsey"
    Const HEADER As String = "AllInternalPasswords User Message"
    Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
    Const REPBACK As String = DBLSPACE & "Please report failure " & _
            "to the microsoft.public.excel.programming newsgroup."
    Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
            "now be free of all password protection, so make sure
you:" & _
            DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
            DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
            DBLSPACE & "Also, remember that the password was " & _
            "put there for a reason. Don't stuff up crucial formulas "
& _
            "or data." & DBLSPACE & "Access and use of some data " & _
            "may be an offense. If in doubt, don't."
    Const MSGNOPWORDS1 As String = "There were no passwords on " & _
            "sheets, or workbook structure or windows." & AUTHORS &
VERSION
    Const MSGNOPWORDS2 As String = "There was no protection to " & _
            "workbook structure or windows." & DBLSPACE & _
            "Proceeding to unprotect sheets." & AUTHORS & VERSION
    Const MSGTAKETIME As String = "After pressing OK button this " & _
            "will take some time." & DBLSPACE & "Amount of time " & _
            "depends on how many different passwords, the " & _
            "passwords, and your computer's specification." & DBLSPACE
& _
            "Just be patient! Make me a coffee!" & AUTHORS & VERSION
    Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
            "Structure or Windows Password set." & DBLSPACE & _
            "The password found was: " & DBLSPACE & "$$" & DBLSPACE &
_
            "Note it down for potential future use in other workbooks
by " & _
            "the same person who set this password." & DBLSPACE & _
            "Now to check and clear other passwords." & AUTHORS &
VERSION
    Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
            "password set." & DBLSPACE & "The password found was: " &
_
            DBLSPACE & "$$" & DBLSPACE & "Note it down for potential "
& _
            "future use in other workbooks by same person who " & _
            "set this password." & DBLSPACE & "Now to check and clear
" & _
            "other passwords." & AUTHORS & VERSION
    Const MSGONLYONE As String = "Only structure / windows " & _
             "protected with the password that was just found." & _
             ALLCLEAR & AUTHORS & VERSION & REPBACK
    Dim w1 As Worksheet, w2 As Worksheet
    Dim i As Integer, j As Integer, k As Integer, l As Integer
    Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
    Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
    Dim PWord1 As String
    Dim ShTag As Boolean, WinTag As Boolean
    
    Application.ScreenUpdating = False
    With ActiveWorkbook
        WinTag = .ProtectStructure Or .ProtectWindows
    End With
    ShTag = False
    For Each w1 In Worksheets
            ShTag = ShTag Or w1.ProtectContents
    Next w1
    If Not ShTag And Not WinTag Then
        MsgBox MSGNOPWORDS1, vbInformation, HEADER
        Exit Sub
    End If
    MsgBox MSGTAKETIME, vbInformation, HEADER
    If Not WinTag Then
        MsgBox MSGNOPWORDS2, vbInformation, HEADER
    Else
      On Error Resume Next
      Do      'dummy do loop
        For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
        For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
        For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
        For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
        With ActiveWorkbook
          .Unprotect Chr(i) & Chr(j) & Chr(k) & _
             Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
             Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
          If .ProtectStructure = False And _
          .ProtectWindows = False Then
              PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
                Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
                Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
              MsgBox Application.Substitute(MSGPWORDFOUND1, _
                    "$$", PWord1), vbInformation, HEADER
              Exit Do  'Bypass all for...nexts
          End If
        End With
        Next: Next: Next: Next: Next: Next
        Next: Next: Next: Next: Next: Next
      Loop Until True
      On Error GoTo 0
    End If
    If WinTag And Not ShTag Then
      MsgBox MSGONLYONE, vbInformation, HEADER
      Exit Sub
    End If
    On Error Resume Next
    For Each w1 In Worksheets
      'Attempt clearance with PWord1
      w1.Unprotect PWord1
    Next w1
    On Error GoTo 0
    ShTag = False
    For Each w1 In Worksheets
      'Checks for all clear ShTag triggered to 1 if not.
      ShTag = ShTag Or w1.ProtectContents
    Next w1
    If ShTag Then
        For Each w1 In Worksheets
          With w1
            If .ProtectContents Then
              On Error Resume Next
              Do      'Dummy do loop
                For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
                For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
                For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To
66
                For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To
126
                .Unprotect Chr(i) & Chr(j) & Chr(k) & _
                  Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
                  Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
                If Not .ProtectContents Then
                  PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
                    Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
                    Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
                  MsgBox Application.Substitute(MSGPWORDFOUND2, _
                        "$$", PWord1), vbInformation, HEADER
                  'leverage finding Pword by trying on other sheets
                  For Each w2 In Worksheets
                    w2.Unprotect PWord1
                  Next w2
                  Exit Do  'Bypass all for...nexts
                End If
                Next: Next: Next: Next: Next: Next
                Next: Next: Next: Next: Next: Next
              Loop Until True
              On Error GoTo 0
            End If
          End With
        Next w1
    End If
    MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation,
HEADER
End Sub

0
ngutman (8)
12/26/2003 7:15:26 PM
excel.misc 78881 articles. 5 followers. Follow

14 Replies
4633 Views

Similar Articles

[PageSpeed] 4

Hi Nathan!

I've sent an original copy.

Try that by opening and then with your protected workbook active use

Tools > Macro
Select AllInternalPasswords
Run

Report back. First case of it not working.


-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Nathan Gutman" <ngutman@cshore.com> wrote in message
news:ko1puvgp5d2psar3glh8qprnb5dv6auksm@4ax.com...
> This code was posted here sometimes ago to recover Excel passwords.
> I am using XL97 and Win95.
> When trying to run it it gets to line:
>
>     WinTag = .ProtectStructure Or .ProtectWindows
>
> and gives runtime error 91
>
> Object variable or With block variable not set.
>
> Can someone help to undertand why and how to fix that?
>
> _________________________________________________________________
> Option Explicit
>
> Public Sub AllInternalPasswords()
>     ' Breaks worksheet and workbook structure passwords. Bob
McCormick
>     '  probably originator of base code algorithm modified for
> coverage
>     '  of workbook structure / windows passwords and for multiple
> passwords
>     '
>     ' Norman Harker and JE McGimpsey 27-Dec-2002 (Version 1.1)
>     ' Modified 2003-Apr-04 by JEM: All msgs to constants, and
>     '   eliminate one Exit Sub (Version 1.1.1)
>     ' Reveals hashed passwords NOT original passwords
>     Const DBLSPACE As String = vbNewLine & vbNewLine
>     Const AUTHORS As String = DBLSPACE & vbNewLine & _
>             "Adapted from Bob McCormick base code by " & _
>             "Norman Harker and JE McGimpsey"
>     Const HEADER As String = "AllInternalPasswords User Message"
>     Const VERSION As String = DBLSPACE & "Version 1.1.1 2003-Apr-04"
>     Const REPBACK As String = DBLSPACE & "Please report failure " &
_
>             "to the microsoft.public.excel.programming newsgroup."
>     Const ALLCLEAR As String = DBLSPACE & "The workbook should " & _
>             "now be free of all password protection, so make sure
> you:" & _
>             DBLSPACE & "SAVE IT NOW!" & DBLSPACE & "and also" & _
>             DBLSPACE & "BACKUP!, BACKUP!!, BACKUP!!!" & _
>             DBLSPACE & "Also, remember that the password was " & _
>             "put there for a reason. Don't stuff up crucial formulas
"
> & _
>             "or data." & DBLSPACE & "Access and use of some data " &
_
>             "may be an offense. If in doubt, don't."
>     Const MSGNOPWORDS1 As String = "There were no passwords on " & _
>             "sheets, or workbook structure or windows." & AUTHORS &
> VERSION
>     Const MSGNOPWORDS2 As String = "There was no protection to " & _
>             "workbook structure or windows." & DBLSPACE & _
>             "Proceeding to unprotect sheets." & AUTHORS & VERSION
>     Const MSGTAKETIME As String = "After pressing OK button this " &
_
>             "will take some time." & DBLSPACE & "Amount of time " &
_
>             "depends on how many different passwords, the " & _
>             "passwords, and your computer's specification." &
DBLSPACE
> & _
>             "Just be patient! Make me a coffee!" & AUTHORS & VERSION
>     Const MSGPWORDFOUND1 As String = "You had a Worksheet " & _
>             "Structure or Windows Password set." & DBLSPACE & _
>             "The password found was: " & DBLSPACE & "$$" & DBLSPACE
&
> _
>             "Note it down for potential future use in other
workbooks
> by " & _
>             "the same person who set this password." & DBLSPACE & _
>             "Now to check and clear other passwords." & AUTHORS &
> VERSION
>     Const MSGPWORDFOUND2 As String = "You had a Worksheet " & _
>             "password set." & DBLSPACE & "The password found was: "
&
> _
>             DBLSPACE & "$$" & DBLSPACE & "Note it down for potential
"
> & _
>             "future use in other workbooks by same person who " & _
>             "set this password." & DBLSPACE & "Now to check and
clear
> " & _
>             "other passwords." & AUTHORS & VERSION
>     Const MSGONLYONE As String = "Only structure / windows " & _
>              "protected with the password that was just found." & _
>              ALLCLEAR & AUTHORS & VERSION & REPBACK
>     Dim w1 As Worksheet, w2 As Worksheet
>     Dim i As Integer, j As Integer, k As Integer, l As Integer
>     Dim m As Integer, n As Integer, i1 As Integer, i2 As Integer
>     Dim i3 As Integer, i4 As Integer, i5 As Integer, i6 As Integer
>     Dim PWord1 As String
>     Dim ShTag As Boolean, WinTag As Boolean
>
>     Application.ScreenUpdating = False
>     With ActiveWorkbook
>         WinTag = .ProtectStructure Or .ProtectWindows
>     End With
>     ShTag = False
>     For Each w1 In Worksheets
>             ShTag = ShTag Or w1.ProtectContents
>     Next w1
>     If Not ShTag And Not WinTag Then
>         MsgBox MSGNOPWORDS1, vbInformation, HEADER
>         Exit Sub
>     End If
>     MsgBox MSGTAKETIME, vbInformation, HEADER
>     If Not WinTag Then
>         MsgBox MSGNOPWORDS2, vbInformation, HEADER
>     Else
>       On Error Resume Next
>       Do      'dummy do loop
>         For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
>         For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
>         For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
>         For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To 126
>         With ActiveWorkbook
>           .Unprotect Chr(i) & Chr(j) & Chr(k) & _
>              Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
>              Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
>           If .ProtectStructure = False And _
>           .ProtectWindows = False Then
>               PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
>                 Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
>                 Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
>               MsgBox Application.Substitute(MSGPWORDFOUND1, _
>                     "$$", PWord1), vbInformation, HEADER
>               Exit Do  'Bypass all for...nexts
>           End If
>         End With
>         Next: Next: Next: Next: Next: Next
>         Next: Next: Next: Next: Next: Next
>       Loop Until True
>       On Error GoTo 0
>     End If
>     If WinTag And Not ShTag Then
>       MsgBox MSGONLYONE, vbInformation, HEADER
>       Exit Sub
>     End If
>     On Error Resume Next
>     For Each w1 In Worksheets
>       'Attempt clearance with PWord1
>       w1.Unprotect PWord1
>     Next w1
>     On Error GoTo 0
>     ShTag = False
>     For Each w1 In Worksheets
>       'Checks for all clear ShTag triggered to 1 if not.
>       ShTag = ShTag Or w1.ProtectContents
>     Next w1
>     If ShTag Then
>         For Each w1 In Worksheets
>           With w1
>             If .ProtectContents Then
>               On Error Resume Next
>               Do      'Dummy do loop
>                 For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
>                 For l = 65 To 66: For m = 65 To 66: For i1 = 65 To
66
>                 For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To
> 66
>                 For i5 = 65 To 66: For i6 = 65 To 66: For n = 32 To
> 126
>                 .Unprotect Chr(i) & Chr(j) & Chr(k) & _
>                   Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
>                   Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
>                 If Not .ProtectContents Then
>                   PWord1 = Chr(i) & Chr(j) & Chr(k) & Chr(l) & _
>                     Chr(m) & Chr(i1) & Chr(i2) & Chr(i3) & _
>                     Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
>                   MsgBox Application.Substitute(MSGPWORDFOUND2, _
>                         "$$", PWord1), vbInformation, HEADER
>                   'leverage finding Pword by trying on other sheets
>                   For Each w2 In Worksheets
>                     w2.Unprotect PWord1
>                   Next w2
>                   Exit Do  'Bypass all for...nexts
>                 End If
>                 Next: Next: Next: Next: Next: Next
>                 Next: Next: Next: Next: Next: Next
>               Loop Until True
>               On Error GoTo 0
>             End If
>           End With
>         Next w1
>     End If
>     MsgBox ALLCLEAR & AUTHORS & VERSION & REPBACK, vbInformation,
> HEADER
> End Sub
>


0
njharker (1646)
12/26/2003 7:28:19 PM
I've posted the original at

    http://www.mcgimpsey.com/excel/removepwords.com

There's a workbook you can  download with the macro as well.

In article <ko1puvgp5d2psar3glh8qprnb5dv6auksm@4ax.com>,
 Nathan Gutman <ngutman@cshore.com> wrote:

> This code was posted here sometimes ago to recover Excel passwords.
> I am using XL97 and Win95.
> When trying to run it it gets to line:
> 
>     WinTag = .ProtectStructure Or .ProtectWindows
> 
> and gives runtime error 91 
> 
> Object variable or With block variable not set.
> 
> Can someone help to undertand why and how to fix that?
0
jemcgimpsey (6723)
12/26/2003 7:59:39 PM
Thanks, I got it and it ran OK but when I wanted to view/expand the
Project in VBA I got "Project unviewable".
I am using Excel97. I understand that his can happen when you save the
workbook under Excel newer than 97.
Could you possibly save it as XL97 and e-mail another copy.
Thank you very much.
On Sat, 27 Dec 2003 06:28:19 +1100, "Norman Harker"
<njharker@optusnet.com.au> wrote:

>Hi Nathan!
>
>I've sent an original copy.
>
>Try that by opening and then with your protected workbook active use
>
>Tools > Macro
>Select AllInternalPasswords
>Run
>
>Report back. First case of it not working.

0
ngutman (8)
12/26/2003 8:55:23 PM
Thanks for the link. This particular link did not work but I found the
workbok on your site unless at this link there is some different.
What I downloaded allinternalpasswords.xls from your site it gave me
the same error.
I am using XL97 - could this have anything to do with how it's
running?
On Fri, 26 Dec 2003 12:59:39 -0700, "J.E. McGimpsey"
<jemcgimpsey@mvps.org> wrote:

>I've posted the original at
>
>    http://www.mcgimpsey.com/excel/removepwords.com
>
>There's a workbook you can  download with the macro as well.
>
>In article <ko1puvgp5d2psar3glh8qprnb5dv6auksm@4ax.com>,
> Nathan Gutman <ngutman@cshore.com> wrote:
>
>> This code was posted here sometimes ago to recover Excel passwords.
>> I am using XL97 and Win95.
>> When trying to run it it gets to line:
>> 
>>     WinTag = .ProtectStructure Or .ProtectWindows
>> 
>> and gives runtime error 91 
>> 
>> Object variable or With block variable not set.
>> 
>> Can someone help to undertand why and how to fix that?

0
ngutman (8)
12/26/2003 8:59:36 PM
Sorry about the link - i only partially pasted over the URL.

As far as the error, I can't reproduce it in any version I have (I 
don't have XL97), but where it's erroring out indicates that the 
ActiveWorkbook is not being properly referenced.

In XL97, that often happens when a  macro is initiated from an 
activeX button that does not have the .TakeFocusOnClick property set 
to False.


In article <728puv0om250ikh2k0jh5j62ijt6kpguqr@4ax.com>,
 Nathan Gutman <ngutman@cshore.com> wrote:

> Thanks for the link. This particular link did not work but I found the
> workbok on your site unless at this link there is some different.
> What I downloaded allinternalpasswords.xls from your site it gave me
> the same error.
> I am using XL97 - could this have anything to do with how it's
> running?
0
jemcgimpsey (6723)
12/26/2003 9:25:07 PM
Hi Nathan!

That's because the VBA project is protected.

The password is

not4u2see

But don't tell anyone!

-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Nathan Gutman" <ngutman@cshore.com> wrote in message
news:m57puv8jc4v8gvg98tt8tnev0ia1ngbdp0@4ax.com...
> Thanks, I got it and it ran OK but when I wanted to view/expand the
> Project in VBA I got "Project unviewable".
> I am using Excel97. I understand that his can happen when you save
the
> workbook under Excel newer than 97.
> Could you possibly save it as XL97 and e-mail another copy.
> Thank you very much.
> On Sat, 27 Dec 2003 06:28:19 +1100, "Norman Harker"
> <njharker@optusnet.com.au> wrote:
>
> >Hi Nathan!
> >
> >I've sent an original copy.
> >
> >Try that by opening and then with your protected workbook active
use
> >
> >Tools > Macro
> >Select AllInternalPasswords
> >Run
> >
> >Report back. First case of it not working.
>


0
njharker (1646)
12/27/2003 3:47:30 AM
I can not use the password because it does not display the "Enter
Password" dialog. It displays "Project Unviewable".
You would need to unprotect the project at your end and e-mail the
unprotected version. Apparently there is a problem with downward
compatibility. As I have mentioned I use XL97 and you probably use a
newer version.
Thanks
On Sat, 27 Dec 2003 14:47:30 +1100, "Norman Harker"
<njharker@optusnet.com.au> wrote:

>Hi Nathan!
>
>That's because the VBA project is protected.
>
>The password is
>
>not4u2see
>
>But don't tell anyone!

0
ngutman (8)
12/27/2003 4:08:34 PM
Hi Nathan!

Sent an unprotected version.

-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Nathan Gutman" <ngutman@cshore.com> wrote in message
news:s7bruv0fsf37c8i61a4o5p8bacp43iph8j@4ax.com...
>
> I can not use the password because it does not display the "Enter
> Password" dialog. It displays "Project Unviewable".
> You would need to unprotect the project at your end and e-mail the
> unprotected version. Apparently there is a problem with downward
> compatibility. As I have mentioned I use XL97 and you probably use a
> newer version.
> Thanks
> On Sat, 27 Dec 2003 14:47:30 +1100, "Norman Harker"
> <njharker@optusnet.com.au> wrote:
>
> >Hi Nathan!
> >
> >That's because the VBA project is protected.
> >
> >The password is
> >
> >not4u2see
> >
> >But don't tell anyone!
>


0
njharker (1646)
12/27/2003 9:11:42 PM
Thanks, worked wonderfully and I noticed some code changes.
It will take me some time to understand the code and learn from it.

Now, is something like that available to unprotect VBA Projects?
On Sun, 28 Dec 2003 08:11:42 +1100, "Norman Harker"
<njharker@optusnet.com.au> wrote:

>Hi Nathan!
>
>Sent an unprotected version.

0
ngutman (8)
12/28/2003 3:00:06 AM
Hi Nathan!

There are some commercial programs that are supposed to unprotect VBA
projects but I've never tried them.

See:

John Walkenbach:
http://j-walk.com/ss/excel/links/pword.htm

-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Nathan Gutman" <ngutman@cshore.com> wrote in message
news:2jhsuvktg8nsql5bh54fch85k8g2d1aqf5@4ax.com...
> Thanks, worked wonderfully and I noticed some code changes.
> It will take me some time to understand the code and learn from it.
>
> Now, is something like that available to unprotect VBA Projects?
> On Sun, 28 Dec 2003 08:11:42 +1100, "Norman Harker"
> <njharker@optusnet.com.au> wrote:
>
> >Hi Nathan!
> >
> >Sent an unprotected version.
>


0
njharker (1646)
12/28/2003 3:06:21 AM
I am not really interested in unprotecting any specific projects.
I am just curious how all that works and want to learn more about
recovering passwords.
I would like to be able to write a routine similar to
AllInternalPasswords that would work on VBA projects or if it were
somewhere available would to learn how it was done.
Nathan
On Sun, 28 Dec 2003 14:06:21 +1100, "Norman Harker"
<njharker@optusnet.com.au> wrote:

>Hi Nathan!
>
>There are some commercial programs that are supposed to unprotect VBA
>projects but I've never tried them.
>
>See:
>
>John Walkenbach:
>http://j-walk.com/ss/excel/links/pword.htm

0
ngutman (8)
12/28/2003 4:00:40 PM
Hi Nathan!

Re:
"I would like to be able to write a routine similar to
AllInternalPasswords that would work on VBA projects or if it were
somewhere available would to learn how it was done."

Some of the principles of AllInternalPasswords could be followed but
the nature of the difference between VBA and internal worksheet and
structure passwords is such that the same limited character looping
won't work. Note that AllInternalPasswords only finds "a" password
that will work, *not* the actual password that was used.

-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"Nathan Gutman" <ngutman@cshore.com> wrote in message
news:t6vtuv8opiij7219s0fdtou32hqansuob1@4ax.com...
> I am not really interested in unprotecting any specific projects.
> I am just curious how all that works and want to learn more about
> recovering passwords.
> I would like to be able to write a routine similar to
> AllInternalPasswords that would work on VBA projects or if it were
> somewhere available would to learn how it was done.
> Nathan
> On Sun, 28 Dec 2003 14:06:21 +1100, "Norman Harker"
> <njharker@optusnet.com.au> wrote:
>
> >Hi Nathan!
> >
> >There are some commercial programs that are supposed to unprotect
VBA
> >projects but I've never tried them.
> >
> >See:
> >
> >John Walkenbach:
> >http://j-walk.com/ss/excel/links/pword.htm
>


0
njharker (1646)
12/28/2003 8:36:30 PM
Not to mention that you'd have to use SendKeys, since VBA can't 
access the project password directly. I suspect that would slow 
things down immensely.

In article <OEC9IJYzDHA.1684@TK2MSFTNGP12.phx.gbl>,
 "Norman Harker" <njharker@optusnet.com.au> wrote:

> Some of the principles of AllInternalPasswords could be followed but
> the nature of the difference between VBA and internal worksheet and
> structure passwords is such that the same limited character looping
> won't work. Note that AllInternalPasswords only finds "a" password
> that will work, *not* the actual password that was used.
0
jemcgimpsey (6723)
12/28/2003 9:32:16 PM
Hi JE!

I suppose that we ought to add that the inherent / actual nature of
internal worksheet protection is to protect against "uninitiated"
accidental damage to cell formulas etc. That is really the limit of
Worksheet password protection. With VBA programs you need a greater
level of experience and are probably aiming more at protecting your
copyright / trade secrets. Also, presumably, your experience has come
with more rigorous approaches to remembering / recording your
passwords (he says glibly after having taken over an hour remembering
the password for an old project!!)

-- 
Regards
Norman Harker MVP (Excel)
Sydney, Australia
njharker@optusnet.com.au
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
"J.E. McGimpsey" <jemcgimpsey@mvps.org> wrote in message
news:jemcgimpsey-19D1FF.14321628122003@msnews.microsoft.com...
> Not to mention that you'd have to use SendKeys, since VBA can't
> access the project password directly. I suspect that would slow
> things down immensely.
>
> In article <OEC9IJYzDHA.1684@TK2MSFTNGP12.phx.gbl>,
>  "Norman Harker" <njharker@optusnet.com.au> wrote:
>
> > Some of the principles of AllInternalPasswords could be followed
but
> > the nature of the difference between VBA and internal worksheet
and
> > structure passwords is such that the same limited character
looping
> > won't work. Note that AllInternalPasswords only finds "a" password
> > that will work, *not* the actual password that was used.


0
njharker (1646)
12/28/2003 10:02:42 PM
Reply:

Similar Artilces:

XLS To CSV Error
Hello, I am having trouble with this excel file. I am converting it to a cvs file for an import. The problem is that item numbers 760-762 import fine, but 764-767 are skipped on the import. It shows all items in the csv file, but I must be missing so formatting on the xls file that is corrupting the csv file? I attached a link to the file, so if anyone can see the error, I would appreciate if you could let me know the error? http://65.18.128.108/2.2/excelfile.xls Thanks JR Hi The formatting on columns C and D change on the line where your import finishes. Maybe that is the problem? An...

how?emails into .xls for email marketing
I am using RMS and was wondering how I can get all my emails into an .xls file. Who can provide clear steps on how to do this. Much appreciated Steps 1. Open Store Operations Administrator 2. File, Connection - fill in database password 3. Query New - this will open a new window 4. Type in sql query to get desired information such as in step 5 - give me all emailaddress from my customers where an email address is not blank. 5. select emailaddress from customer where emailaddress <> '' 6. Press F5 (which is run key) 7. A result of all the email addresses will app...

Convert pst to xls ?
Is there a way to convert a Contact list that has been made a .pst into a Excel spreadsheet? thanks! "Deb" <anonymous@discussions.microsoft.com> wrote in message news:ead701c43cec$73798a30$a501280a@phx.gbl... > Is there a way to convert a Contact list that has been > made a .pst into a Excel spreadsheet? > thanks! Open in Outlook and export as a CSV file. ...

Dc130.xls
My virus software has identified this file as corrupt. What is it; what does it do? Can I safely delete it? If I delete it do I need a new one? How can I get an updated version if this is a required file? ...

Can I make an xls start up in 2003
ever since I've installed 2007, all my files will start up 2007 when I double -click them. Can I set up my machine so that: xlsx will open up 2007 and xls will open up 2003 Thanks M hi windows considers the last version installed as the default so it's basicly a windows thing, not necessarily an excel thing. one possible fix would be to reinstall excel 03 to re-set it as default. another would be to do a detect and repair in 03 setup. some have reported success with this. good luck. regards FSt1 "Michelle" wrote: > ever sinc...

.xls files opening in IE rather than xls
When opening files downloaded from the web, they are opened in an IE windo rather than the appropriate Office 2003 tool (word, excel, etc.) From a previous post: There's a setting in Windows that you can change. In win98, I can do this: Start Windows Explorer View|Folder Options File Types Tab scroll down to MS Excel Worksheet Select it click the edit button There's an option to "browse in same window". Uncheck it. That's where you can toggle the "confirm open after download", too. How to Configure Internet Explorer to Open Office Documents in the Appr...

xp wont open .xls file
I have been sent an .xls file on email which my new computer will not open. Have M/S office installed but cant open the drat thing. Any help please ?? So what happens? -- No private emails please, for everyone's benefit keep the discussion in the newsgroup. Regards, Peo Sjoblom "Redfred" <anonymous@discussions.microsoft.com> wrote in message news:1b94a01c44ff6$2dc0dda0$a001280a@phx.gbl... > I have been sent an .xls file on email which my new > computer will not open. Have M/S office installed but > cant open the drat thing. Any help please ?? Hi what e...

Hyperlink formula opens .xls and .doc, but not .pdf
I have a list of Word, Excel, and Acrobat files in C and the formula =HYPERLINK("S:\public\Forms\" &C2, "Open " & C2) in C. Multiple people are using the worksheet. It appears that everyone can open the .xls and .doc files, but the .pdfs open for some and not others - often with a brief flash of the Acrobat application, then nothing. Copying file name and opening it within Acrobat works fine. Any ideas on where this behaviour is comming from? Tim Mills-Groninger So make sure that all the users have the latest version of the software: http://www.adobe.com/suppo...

.xls
How can I swich .xls to .doc or.txt?? djj222usmc wrote: > How can I swich .xls to .doc or.txt?? Save As? Or copy|paste into Word (or NotePad) and save from there. djj222usmc wrote: > > How can I swich .xls to .doc or.txt?? -- Dave Peterson ...

Xls does not appear
When I open a xls file (that was previously created by a VBA program) , the sheets dont appear BUT the VBAproject associated to it opened in the VBA window. Also when I try to reopen it I got the message "File is already opened". Thanks Hi Nadine have you tried in excel itself the option of window / unhide to see if the workbook has been hidden? Once you unhide it save it again and then close & reopen and see if the problem goes away. Cheers JulieD "Nadine" <anonymous@discussions.microsoft.com> wrote in message news:8de101c485ed$fbab7e00$a501280a@phx.gbl....

AllInternalPasswords.xls
This code was posted here sometimes ago to recover Excel passwords. I am using XL97 and Win95. When trying to run it it gets to line: WinTag = .ProtectStructure Or .ProtectWindows and gives runtime error 91 Object variable or With block variable not set. Can someone help to undertand why and how to fix that? _________________________________________________________________ Option Explicit Public Sub AllInternalPasswords() ' Breaks worksheet and workbook structure passwords. Bob McCormick ' probably originator of base code algorithm modified for coverage ' o...

xls extension
when I enter file on a header the extension xls is also printed. How do I stop this happening? Hi If you go to Windows Explorer and on the Tools menu, choose Folder Options and then click the View Tab. Scroll down until you find the check box that says 'Hide file extensions for know file types. If you click this box to check it on, your .xls should be hidden. You will probably have to close Excel and restart it and then it should work. Hope this helps Ann >-----Original Message----- >when I enter file on a header the extension xls is also printed. How do I >stop...

Hide Global.xls (personal.xls) in project explorer
How do I hide VBAProject(Global.xls) in project explorer. I just want my normal project there. Helge You can't hide it, but you could give it a password: Select your project Tools|VBAProject|Protection tab Give it a memorable password At least the project won't be too intrusive. nankerp wrote: > > How do I hide VBAProject(Global.xls) in project explorer. I just want > my normal project there. > > Helge -- Dave Peterson ...

xls attachment became dat
Hi all. Recently i received an email that was send to me and my colleague. The attachment is of xls but when i received it, it was in the form of dat. My colleague received it as xls. Is there anything wrong with my outlook? Are you using Microsoft Outlook or Outlook Express? These two are very different programs where one can handle Rich Text messages (Microsoft Outlook) while the other cannot. The common message formats between Microsoft Outlook and Outlook Express is Plain Text and/or HTML. Therefore I would double check with the sender to verify that they sent the message in Pla...

controling a .xls from another .xls
does anyone know if it is possible to control one excell file from another. i.e lets say there are two files: a.xls & b.xls in "a.xls" cell A1 we input the number "100", is it possible for this number to automatically be populated in to cell A1 of "b.xls"??? if so how??? thanks guys -- on-a-mission ------------------------------------------------------------------------ on-a-mission's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31630 View this thread: http://www.excelforum.com/showthread.php?threadid=513234 In cell A...

Saving .xls without macro
Hello, I did a search for this issue, but I can't find anything related t it. This is my issue: I have an .xlt which contains macro, at the end of the macro I save th resulting sheets as .xls. The resulting sheets are saved with origina macro. I wonder is there a way that I could save the file without th macro. I am using this code to save my file as .xls. File_Save_Name = Sheets("Menu").Range("D6").Value & Format _(Now "mmddyy") & ".xls" ActiveWorkbook.SaveAs FileName:=File_Save_Name, FileFormat:= _ xlNormal, Password:="",...

I'm getting files saved with names like 48A52100 with no .xls f.
I'm getting spreadsheets saved on our network with an 8-character string as the filename and no .xls file extension. Using the "Open with . . ." option they successfully open with Excel. Does anyone know why this is happening? -- Iain N Black Kelton - These are temp files created when Excel saves a workbook. Normally they are deleted when the save is complete. This might fall under the funny behaviors that occur when working with files on a network. - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech...

importing .xls chart info to .xls calendar
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) How do I take the information in an .xls file and import it to a blank .xls calendar? ...

launching xls in web browser
I am trying to launch two instances of the same xls file from a browser. The first one launches successfully in a new browser window. The second one also launches successfully. However, the first browser window becomes blank after the second report launches. When I close the first browser window the second window becomes blank as well. Does anyone know how to fix this problem? ...

Opening xls files in word
When I open an excel file it opens in word. If I open Excel and then open the file it opens properly. How do I change the default to open all excel files in excel? Rich Rich, Open up Windows Explorer, click the 'Tools' toolbar and then 'Folder Options...'. Click the 'File Types' tab, and scroll down to find the XLS file extension. Highlight "XLS" - I think it will say that it's set to open with Microsoft Word. If so, click the 'Change' button and set it to open with Microsoft Ex...

xls:1 but no xls:2
Hi, I have a workbook which opens with the window title filename.xls:1 as if there are two or more views of the same workbook. However, there is only one view I can find (I have minimised the window within Excel, looked for other Excel windows but to no avail). When I try to close the file (ctrl-w or clicking the lower x) the workbook disappears (as expected) but Excel behaves as if I have just closed one of several views: it doesn't ask me if I would like to save changes. However, when I close the Excel program, it behaves as if I am closing filename.xls and asks if I ...

I do not have Excel, can I read .xls files sent to me?
I do not have Excel, yet I am sent .xls files. Is there anyway I can read these files even though I do not have Excel? I have WorksSuite 2003. Hi you may try the free Excel viewer: http://office.microsoft.com/en-us/officeupdate/CD010225881033.aspx "RevEPR" wrote: > I do not have Excel, yet I am sent .xls files. Is there anyway I can read > these files even though I do not have Excel? I have WorksSuite 2003. Try the free Excel viewer from Microsoft http://www.microsoft.com/downloads/details.aspx?FamilyID=4EB83149-91DA-4110-8595-4A960D3E1C7C&displaylang=EN -...

Save .xls as fixed width text or csv
How do I save an Excel file as a Fixed Width Text file? Brian Save it as a space delimited text file *.prn -- HTH Nick Hodge Southampton, England nick_hodge@btinternet.com "Brian Jenkins" <bpjenkins@delinvest.com> wrote in message news:032301c38e92$77252bc0$a301280a@phx.gbl... > How do I save an Excel file as a Fixed Width Text file? ...

import groups from xls
In outlook 20000, If I have an excel spreadsheet with First, Last and email address for 50 people, can I import it as a group into outlook? -- http://QLiner.com Authority does not make you a leader It gives you the opportunity to be one. - Anonymous You can import it into your Contacts folder. You'd still have to then either create a distribution list manually or add each of these 50 people to the To or BCC field for an email message. -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 Author, Absolute Beginner's Guide...

Convert CSV Files to XLS
Hello: I have approximately 1300 .csv files that I need to convert to .xls files so I can extract data from a master spreadsheet. Excel apparently requires a .csv file be open to extract the data. I could open each one individually and do a save as, but that would be rather tedious. Is there a way to programmatically do this. The .csv files are in the following format: xxnzz.csv where: xx is 01-29 (notice the leading 0) n is n zz is 01-110 (notice the leading 0 on 1 digit numbers and that the highest number is 3 digits, 2 digit numbers have no leading 0 i.e. 21n99. "Pigs can't be...