Announcement

Collapse
No announcement yet.

Toolbar Testing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Toolbar Testing



    Just testing the toolbar.
    This is
    a table
    test
    Last edited by skywriter; October 6th, 2017, 23:39. Reason: Just testing.
    Bruce

  • #2
    Code:
    Sub Test()
    
    End Sub
    Testingsubscript
    Bruce

    Comment


    • #3


      I've not added the [vba][/vba] tags to the toolbar yet. On my list of things....


      Sub ConvertAllToValues()
      '
      'Originally Adapted from OZgrid.com
      '
      Dim OldSelection As Range
      Dim HiddenSheets() As Boolean
      Dim Goahead As Integer, n As Integer, i As Integer
      Goahead = MsgBox("This will irreversibly convert all formulas in the workbook to values. Continue?", vbOKCancel, "Confirm conversion to values only")
      If Goahead = vbOK Then
      Application.ScreenUpdating = False
      Application.Calculation = xlCalculationManual

      n = Sheets.Count
      ReDim HiddenSheets(1 To n) As Boolean

      For i = 1 To n
      If Sheets(i).Visible = False Then HiddenSheets(i) = True
      Sheets(i).Visible = True
      Next

      Set OldSelection = Selection.Cells
      Worksheets.Select
      Cells.Select
      Selection.Copy
      Selection.PasteSpecial Paste:=xlPasteValues

      Cells(OldSelection.Row, OldSelection.Column).Select
      Sheets(OldSelection.Worksheet.Name).Select

      Application.CutCopyMode = False

      For i = 1 To n
      Sheets(i).Visible = Not HiddenSheets(i)
      Next

      Application.ScreenUpdating = True
      Application.Calculation = xlCalculationAutomatic
      End If
      End Sub

      Comment

      Working...
      X