Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2020, 03:10 AM
macropod's Avatar
macropod macropod is offline Adjust Two Columns Without Changing Combined Size Windows 7 64bit Adjust Two Columns Without Changing Combined Size Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default


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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjust Two Columns Without Changing Combined Size How to Adjust Every Header Section Size at Once? CrossReach Word 4 03-13-2016 10:49 AM
Adjust Two Columns Without Changing Combined Size How do I adjust the size of the printed slide 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
Adjust Two Columns Without Changing Combined Size Powerpoint 2013 doesn't adjust size on external display mejnik PowerPoint 1 04-04-2014 09:12 AM
Adjust Two Columns Without Changing Combined Size Adjust Window size at open Gary Drumm Windows 2 03-31-2014 08:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft