![]() |
#4
|
||||
|
||||
![]()
Try something along the lines of:
Code:
Sub Demo() Dim tw As Single, cw As Single, nw As Single With Selection If .Columns.Count <> 2 Then Exit Sub tw = .Columns.Width cw = .Columns(1).Width nw = InputBox("The combined column width is: " & tw & vbCr & _ "The first column width is: " & cw & vbCr & _ "How wide should the first column be?", , cw) With .Columns(1) .ColumnWidth = .ColumnWidth * nw / cw End With With .Columns(2) .ColumnWidth = .ColumnWidth * (tw - nw) / (tw - cw) End With End With End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
CrossReach | Word | 4 | 03-13-2016 10:49 AM |
![]() |
Suppy | PowerPoint | 2 | 01-27-2015 02:15 AM |
How to adjust Image size and other question | arjfca | Word VBA | 1 | 12-05-2014 02:00 AM |
![]() |
mejnik | PowerPoint | 1 | 04-04-2014 09:12 AM |
![]() |
Gary Drumm | Windows | 2 | 03-31-2014 08:22 AM |