Resizing the Operations Chart
Step 1: Open Excel
Step 2: Press Alt-F11 to open the Visual Basic editor
Step 3: Press Ctrl-G to get the immediate (debugging) window
Step 4: Type ‘?application.StartupPath‘ and press enter. You will get the Excel startup path for example I got:
“C:\Documents and Settings\User\Application Data\Microsoft\Excel\XLSTART”
Step 5: Close the Visual Basic editor and create a new Workbook / XLS file
Step 6: Save this file as “Personal.xls” (older versions of Excel) or a Macro-Enabled “Personal.xlsx” (for newer versions of Excel) in the directory as found in d]
Step 7: Press Alt-F11 to open the Visual Basic editor
Step 8: Double click “ThisWorkbook” on the top left to open the code editor for the workbook
Step 9: Paste the code:
''Simulates row height autofit for a merged cell if the active cell.. '' is merged. '' has Wrap Text set. '' includes only 1 row. ''Unlike real autosizing the macro only increases row height '' (if needed). It does not reduce row height because another '' merged cell on the same row may needed a greater height '' than the active cell. Sub AutoFitMergedCellRowHeight() Dim CurrentRowHeight As Single, MergedCellRgWidth As Single Dim CurrCell As Range Dim ActiveCellWidth As Single, PossNewRowHeight As Single Dim StartSel As Range Dim SelCell As Range Set StartSel = Selection For Each SelCell In StartSel If SelCell.MergeCells Then With SelCell.MergeArea .Select If .Rows.Count = 1 And .WrapText = True Then Application.ScreenUpdating = False CurrentRowHeight = .RowHeight ActiveCellWidth = SelCell.ColumnWidth MergedCellRgWidth = 0 For Each CurrCell In Selection MergedCellRgWidth = CurrCell.ColumnWidth + MergedCellRgWidth Next .MergeCells = False .Cells(1).ColumnWidth = MergedCellRgWidth .EntireRow.AutoFit PossNewRowHeight = .RowHeight .Cells(1).ColumnWidth = ActiveCellWidth .MergeCells = True .RowHeight = IIf(CurrentRowHeight > PossNewRowHeight, CurrentRowHeight, PossNewRowHeight) End If End With End If Next SelCell StartSel.Select End Sub
Step 10: Close the Visual Basic window
Step 11: Go to Tools->Macro->Macros / [View > Macros > View Macros] <--- Excel 2010 and above
Step 12: Click on “ThisWorkbook.AutoFitMergedCellRowHeight” and then Options. Choose a shortcut key, I chose ‘r’ for“resize” (you don’t need to press the ctrl-key, just the letter)
Step 13: Click Ok, close the macro window and save the Personal.xls spreadsheet/ [Save as Excel Macro-enabled workbook under Files of Type] <--- Excel 2010 and above
Step 14: Open an Ops Chart export, navigate to the notes worksheet, select all the notes and press Ctrl-R
Keep up to date with us
Menu
Visit our website
ResRequest Modules
- Business Intelligence
- Central Reservations
- Channel Management
- Customer Relationship Management
- Developer
- Email Series 2022
- Email Series 2023
- Financial Management
- Marketing tools
- Payment Gateways
- Point of sale
- Product
- Professional Services
- Property Management
- ResConnect
- ResInsite
- ResNova
- System Setup
- Technical Alerts
- Technical Tips
- Telephone Management
- Webinars Index