Can I expand & shrink columns?
Hello everyone,
I want to know it there is a way to pick 2 or 4 columns and have them expand when I click on them. So I want it where I can click on them and they expand to normal size and if I click on them again the columns will shrink back to a smaller size. I hope I'm making sense. I don't want to have to widened the column by clicking in between each column, I know how to do that. I'm trying to create sort of a daily planner, so I want it to where the days I'm not looking at are like shrunk to a smaller size |
Can I expand & shrink columns?
Right click sheet tabview codeinsert this.Modify to suit
Private Sub Worksheet_BeforeDoubleClick _ (ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Columns("D:F")) Is Nothing Then Exit Sub tc = Target.Column If Columns(tc).ColumnWidth < 15 Then Columns(tc).ColumnWidth = 15 Else Columns(tc).ColumnWidth = 5 End If End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "youngsequan" wrote in message ... Hello everyone, I want to know it there is a way to pick 2 or 4 columns and have them expand when I click on them. So I want it where I can click on them and they expand to normal size and if I click on them again the columns will shrink back to a smaller size. I hope I'm making sense. I don't want to have to widened the column by clicking in between each column, I know how to do that. I'm trying to create sort of a daily planner, so I want it to where the days I'm not looking at are like shrunk to a smaller size |
All times are GMT +1. The time now is 07:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com