Looking to Reprint this content?
Cover | Table of Contents | Colophon
Sub FixWordTableInExcel97()
'Removes all cell merges and text wrapping from
'the pasted table and then deletes all blank
'rows added by the paste.
With Selection
.WrapText = False
.MergeCells = False
End With
Dim Rw As Range
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
Selection.SpecialCells(xlCellTypeBlanks).Select
For Each Rw In Selection.Rows
If WorksheetFunction.CountA(Selection. _
EntireRow) = 0 Then
Selection.EntireRow.Delete
End If
Next Rw
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
End With
End Subhttp://www.ozgrid.com/VBA/VBACode.htm. It is used here with permission.
Sub NextSheetSameCell()
Dim rngCurrentCell As Range
Dim shtMySheet As Worksheet
Dim strCellAddress As String
'strCellAddress = ActiveCell.Address
'Comment out the line above to record the
'selected range's address, or comment out the
'line below to record the active cell's address.
strCellAddress = _
ActiveWindow.RangeSelection.Address
Set shtMySheet = ActiveWindow.ActiveSheet
If Worksheets.Count > shtMySheet.Index Then
shtMySheet.Next.Activate
Range(strCellAddress).Activate
Else
Worksheets(1).Activate
Range(strCellAddress).Activate
End If
Set shtMySheet = Nothing
End Sub
Sub WrapTextMacro()
Selection.WrapText = True
End Sub
Sub UnWrapTextMacro()
Selection.WrapText = False
End Sub
|
Key(s)
|
Result
|
|---|---|
|
F9
|
Calculates all formulas that have changed since the last calculation, and formulas that are dependent on them, in all open workbooks. |