Nope, no luck with 5, same error.
Anyone good at cracking VBA passwords?
OpenOffice Calc didn't ask any passwords...
Here is Save module (Everything commented out. I don't know why)
-ek
Rem Attribute VBA_ModuleType=VBAModule
Sub Save
Rem Option Explicit
Rem
Rem Public Sub SaveBook()
Rem Application.ScreenUpdating = False
Rem Dim fName
Rem Dim NewBook
Rem Dim j
Rem Dim saveFile
Rem fName = UserForm1.tChooseDir.Value & "\" & UserForm1.tFileName.Value
Rem If Dir(UserForm1.tChooseDir.Value, vbDirectory) = "" Or
Dir(UserForm1.tChooseDir.Value, vbDirectory) = "." Then
Rem MsgBox "Please choose an existing directory", vbCritical
Rem saveFile = False
Rem ElseIf UserForm1.tFileName.Value = "" Or UserForm1.tFileName =
".xls" Then
Rem MsgBox "No file name specified", vbCritical
Rem saveFile = False
Rem ElseIf UserForm1.tFileName.Value = Application.ActiveWorkbook.Name
Then
Rem MsgBox "This file name can not be used", vbInformation
Rem UserForm1.tFileName.Value = ""
Rem saveFile = False
Rem ElseIf UserForm1.CBoxFiles.ListCount > 0 Then
Rem For j = 0 To UserForm1.CBoxFiles.ListCount - 1
Rem UserForm1.CBoxFiles.ListIndex = j
Rem If UserForm1.tFileName.Value = UserForm1.CBoxFiles.Value
Then
Rem If MsgBox("This file already exist, do you want to
overwrite it ?", vbOKCancel) = vbOK Then
Rem saveFile = True
Rem Else
Rem saveFile = False
Rem MsgBox "File not saved", vbInformation
Rem End If
Rem Exit For
Rem Else
Rem saveFile = True
Rem End If
Rem Next
Rem Else
Rem saveFile = True
Rem End If
Rem If saveFile Then
Rem Set NewBook = Workbooks.Add
Rem With NewBook
Rem Call FormatBook
Rem Application.DisplayAlerts = False
Rem .SaveAs (fName)
Rem .Close
Rem Application.DisplayAlerts = True
Rem End With
Rem MsgBox "File saved !", vbInformation
Rem Call ListBook(UserForm1.tChooseDir.Value)
Rem End If
Rem UserForm1.tFileName.Value = ""
Rem Application.ScreenUpdating = True
Rem End Sub
Rem
Rem Public Sub ReadBook()
Rem Dim i
Rem i = 1
Rem Do
Rem SMPS.Vars.Cvars(ActiveCell.Offset(i, 0).Value).Value =
ActiveCell.Offset(i, 1).Value
Rem i = i + 1
Rem Loop Until (ActiveCell.Offset(i, 0).Value = "")
Rem Call LoadDefault
Rem UserForm1.MultiPage1.Value = 0
Rem UserForm1.MultiPage2.Value = 0
Rem UserForm1.MultiPage1(1).Enabled = False
Rem UserForm1.MultiPage1(2).Enabled = False
Rem UserForm1.MultiPage1(3).Enabled = False
Rem UserForm1.MultiPage1(4).Enabled = False
Rem UserForm1.MultiPage1(5).Enabled = False
Rem UserForm1.MultiPage1(6).Enabled = False
Rem End Sub
Rem
Rem Public Sub VerifBook(file)
Rem Dim i
Rem Dim tempsum
Rem Application.ScreenUpdating = False
Rem With Application.Workbooks.Open(file)
Rem
Rem i = 1
Rem Range("b1").Select
Rem Do
Rem tempsum = tempsum + sumstr(ActiveCell.Offset(i, 0).Value)
Rem i = i + 1
Rem Loop Until (ActiveCell.Offset(i, 0).Value = "")
Rem If Range("a1").Value = tempsum And IsNumeric(Range("a1").Value)
And Range("a1").Value <> "" Then
Rem Call ReadBook
Rem InUseFile = Dir(file)
Rem .Close
Rem Else
Rem .Close
Rem MsgBox "This file is not a valid save file", vbExclamation
Rem End If
Rem End With
Rem Application.ScreenUpdating = True
Rem End Sub
Rem
Rem Public Sub ListBook(UsedDir)
Rem Dim i, j
Rem Dim str
Rem Dim index
Rem UserForm1.CBoxFiles.Clear
Rem With Application.FileSearch
Rem .LookIn = UsedDir
Rem .FileType = msoFileTypeExcelWorkbooks
Rem If .Execute() > 0 Then
Rem For i = 1 To .FoundFiles.Count
Rem str = Split(.FoundFiles(i), "\")
Rem If str(UBound(str)) <> Application.ActiveWorkbook.Name
Then
Rem UserForm1.CBoxFiles.AddItem str(UBound(str))
Rem End If
Rem If InUseFile <> "" Then
Rem For j = 0 To UserForm1.CBoxFiles.ListCount
Rem If InUseFile = UserForm1.CBoxFiles.Value Then
Rem UserForm1.CBoxFiles.ListIndex = j
Rem End If
Rem Next
Rem Else
Rem UserForm1.CBoxFiles.ListIndex = 0
Rem End If
Rem Next i
Rem UserForm1.lErrorLoading.Caption = ""
Rem UserForm1.Frame25.Visible = True
Rem Else
Rem UserForm1.lErrorLoading.Caption = "Directory doesn't exist
or no saved files inside"
Rem UserForm1.Frame25.Visible = False
Rem End If
Rem End With
Rem
Rem End Sub
Rem
Rem Public Sub FormatBook()
Rem Dim data As Object
Rem Dim i
Rem i = 1
Rem Range("a1").Value = 0
Rem Range("b1").Select
Rem For Each data In SMPS.Vars.Cvars
Rem ActiveCell.Offset(i, 0).Value = data.Name
Rem ActiveCell.Offset(i, 1).Value = data.Value
Rem Range("a1").Value = Range("a1").Value + sumstr(data.Name)
Rem i = i + 1
Rem Next
Rem End Sub
Rem
Rem Public Function sumstr(str)
Rem Dim char
Rem sumstr = 0
Rem For char = 1 To Len(str)
Rem sumstr = sumstr + Asc(Mid(str, char, 1))
Rem Next
Rem End Function
Rem
Rem
End Sub