LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Push range against right screen edge

Trying to figure out a way to push a selected range against the right edge
of the screen by inreasing the width of column A.
It thought a loop like this would do it:

Do Until lRangeRightCol _
rngVis.Cells(rngVis.Cells(1).Row, _
rngVis.Columns.count).Column
Columns(1).ColumnWidth = Columns(1).ColumnWidth + 1
Set rngVis = ActiveWindow.VisibleRange
DoEvents
Loop

Where lRangeRightCol is the right-most column of this range.
However it doesn't work. Column A gets wider and wider, but the loop doesn't
exit.
Updating the screen doesn't help or more precisely doing
Application.ScreenUpdating = True
doesn't update the screen and maybe that is the trouble.

Any suggestions how to do this?

RBS

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I print edge to edge with absolutely NO margins Girl4chuckie Excel Worksheet Functions 3 April 3rd 23 07:41 PM
Move workseet tabs from the bottom of the screen to the right edge ISUTUBBS Excel Discussion (Misc queries) 1 May 18th 06 08:32 PM
And once again: X and Y Screen Coordinates of a Range marsou Excel Programming 8 August 23rd 05 11:43 AM
X and Y Screen Coordinates of a Range !!! RAFAAJ2000[_2_] Excel Programming 8 June 22nd 05 12:07 AM
Edge Sequence Color smandula Excel Programming 2 May 30th 05 10:15 PM


All times are GMT +1. The time now is 12:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"