Without seeing the workbook I can't help much more...would you be willing to email it to me? My email address is in my profile.
Another option is to obfuscate the values in the workbook. The macro below will obfuscate all the values in the current selection. To use, add the code to a general code module in the workbook, select the cells to obfuscate, and run the macro "ObfuscateSelection". Repeat for all values in the workbook that are sensitive. It handles strings, numbers, currency, and dates.
Public Sub ObfuscateSelection()
Dim Cell As Range
For Each Cell In Selection
If Not Cell.HasFormula And Len(Cell) > 0 Then
Select Case VarType(Cell)
Case vbString, vbDouble, vbCurrency
Cell.Value = ObfuscateString(Cell.Value
)
Case vbDate
Cell.Value = Cell.Value + Int(Rnd() * (Now() - Cell.Value) * 2 - (Now() - Cell.Value))
End Select
End If
Next Cell
End Sub
Private Function ObfuscateString(ByVal Value As String) As String
Dim Position As Long
For Position = 1 To Len(Value)
If Mid(Value, Position, 1) Like "#" Then
Mid(Value, Position, 1) = Mid("0123456789", Int(Rnd() * 10 + 1), 1)
ElseIf Mid(Value, Position, 1) Like "[abcdefghijklmnopqrstuvwx
yzABCDEFGH
IJKLMNOPQR
STUVWXYZ]"
Then
Mid(Value, Position, 1) = Mid("abcdefghijklmnopqrstu
vwxyzABCDE
FGHIJKLMNO
PQRSTUVWXY
Z", Int(Rnd() * 52 + 1), 1)
End If
Next Position
ObfuscateString = Value
End Function
There are many possible causes for corrupted workbooks. The most common are problems with the internal tables used to store cell formatting information and corrupted p-code. It is usually very difficult to determine the cause. Below are some techniques for repairing a corrupt workbook.
If access to Excel 2007 or later is an option then open the workbook using 2007 or later, export the VBA code to files, save the workbook as XML, re-import the VBA, and save the workbook in the desired format.
An easier solution is to use a third party tool such as Excel Workbook Rebuilder from VBUsers.com (
http://www.vbusers.com/commercial/Rebuild.asp).
Kevin