Excel AddIn to reset the last worksheet cell

source: http://xsformatcleaner.codeplex.com/

Microsoft Excel saves only the part of each worksheet that is in use, meaning the section that contains data or formatting. Sometimes the last cell of a worksheet may be beyond the range of your actual used data. This issue may cause you to have a larger file size than neccesary, you may print extra pages, you may receive “Out of Memory” error messages, or you may experience other unusual behavior. Clearing the excess rows and columns to reset the last cell can help to resolve these issues.

Note You can locate the last cell of the active worksheet by pressing CTRL+SHIFT+END.

This is a sample of the code located in Microsoft KB 244435
How to reset the last cell in Excel
http://support.microsoft.com/kb/244435

 

Crack Sheet Protection Password in Excel

This routine provides a password to unprotect your worksheet. However, it may not give you the original password that was used.

Open the workbook that has the protected sheet in it. Hit Alt+F11 to view the Visual Basic Editor. Hit Insert-Module and paste this code into the right-hand code window:

Sub PasswordBreaker()
  'Author unknown but submitted by brettdj of www.experts-exchange.com

  Dim i As Integer, j As Integer, k As Integer
  Dim l As Integer, m As Integer, n As Integer
  Dim i1 As Integer, i2 As Integer, i3 As Integer
  Dim i4 As Integer, i5 As Integer, i6 As Integer
  On Error Resume Next
  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

 ActiveSheet.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 ActiveSheet.ProtectContents = False Then
      MsgBox "One usable password is " & Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
   ActiveWorkbook.Sheets(1).Select
   Range("a1").FormulaR1C1 = Chr(i) & Chr(j) & _
          Chr(k) & Chr(l) & Chr(m) & Chr(i1) & Chr(i2) & _
          Chr(i3) & Chr(i4) & Chr(i5) & Chr(i6) & Chr(n)
       Exit Sub
  End If
  Next: Next: Next: Next: Next: Next
  Next: Next: Next: Next: Next: Next

End Sub

 

Close the VB Editor window. Navigate to the worksheet you want to unprotect. Hit Tools-Macro-Macros and double-click PasswordBreaker in the list.

source: http://www.theofficeexperts.com/VBASamples/Excel02.htm

Mailbox and other printer-specific settings are saved with an Excel file

source

SYMPTOMS

When you send a Microsoft Excel workbook to another user account in an e-mail message or store the file on a network share, with the print settings set to print to your mailbox or to a local printer with specialized settings, these settings may still be in effect for the other users. If they print the workbook, it may either print to your mailbox, not theirs, or it may try to print by using certain settings for your local printer.

RESOLUTION


To resolve this issue, use one of the following methods.

Method 1: Remove the printer file settings for a workbook

Excel 2003 and Excel 2002

  1. Change the default printer to a different printer.
  2. In Excel, open the workbook that is experiencing the problem.
  3. On the File menu, click Print.
  4. In the Print dialog box, click Cancel.
  5. On the File menu, click Save.

Method 2: Add a registry key

Excel 2003

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
A software update has not been created for this issue in Microsoft Office Excel 2003. However, you can add the QFE_Sitka registry key to work around the issue. When you set the value of the QFE_Sitka registry key to 1, the printer settings are not saved in the file.

Follow these steps, and then quit Registry Editor:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options
  3. On the Edit menu, point to New, and then click DWORD value.
  4. Type QFE_Sitka, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 1, and then click OK.

Excel 2002 Service Pack 2 (SP2) or later service packs

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. If the hotfix is available for download, there is a “Hotfix download available” section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)  

Note The “Hotfix download available” form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The global version of this hotfix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date (UTC)        Time (UTC)   Version            File Name
--------------------------------------------------------------
2003-Oct-06     21:43     4747816     EXCELop.msp
2003-Oct-06     22:51     16571988     EXCELff.msp

After the hotfix is installed, the global version of this fix will have the file attributes (or later) that are listed in the following table:

Date (UTC)       Time (UTC)   Version            Size               File Name
----------------------------------------------------------------------------
2003-Oct-03     01:08     10.0.5730.0     9181752     EXCEL.EXE

How to Obtain the Hotfix

This issue is fixed in the Excel 2002 Hotfix Package that is dated October 6, 2003. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

829340 (http://support.microsoft.com/kb/829340/ ) Excel 2002 Post-Service Pack 2 Hotfix Package: October 6, 2003

After you install the Excel 2002 hotfix, you must add the QFE_Sitka registry key to activate the hotfix. When you set the value of the QFE_Sitka registry key to 1, printer settings are not saved in the file.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
Follow these steps, and then quit Registry Editor:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following key in the registry:
    HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Excel\Options
  3. On the Edit menu, point to New, and then click DWORD value.
  4. Type QFE_Sitka, and then press ENTER.
  5. On the Edit menu, click Modify.
  6. Type 1, and then click OK.