Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Right Hand Column on Screen

Hi

Can someone give me the code snippet to give the column
number of the the column which is at the far right of the
screen itself i.e. the returned result will change if the
zoom factor of the display is changed.

Thanks

Tim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Right Hand Column on Screen

Tim,

Try something like the following

With ActiveWindow.VisibleRange
MsgBox .Cells(.Cells.Count).Column
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Tim Childs" wrote in message
...
Hi

Can someone give me the code snippet to give the column
number of the the column which is at the far right of the
screen itself i.e. the returned result will change if the
zoom factor of the display is changed.

Thanks

Tim



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Right Hand Column on Screen

Sub FindColumn()
Dim rng As Range
Set rng = ActiveWindow.VisibleRange
Set rng = rng.Columns(rng.Columns.Count)
MsgBox rng.Address
End Sub


--
Regards,
Tom Ogilvy

"Tim Childs" wrote in message
...
Hi

Can someone give me the code snippet to give the column
number of the the column which is at the far right of the
screen itself i.e. the returned result will change if the
zoom factor of the display is changed.

Thanks

Tim



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Right Hand Column on Screen

Chip

just the ticket, brilliant as usual!
thanks

Tim

-----Original Message-----
Tim,

Try something like the following

With ActiveWindow.VisibleRange
MsgBox .Cells(.Cells.Count).Column
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


Reply
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
excel instability - screen scrolls to end of sheet on right hand side Scott Excel Discussion (Misc queries) 2 May 20th 12 08:47 PM
Scroll a cell to the top left hand corner of the screen Daveh Excel Discussion (Misc queries) 2 August 30th 06 05:17 PM
how do I "freeze" the left hand title column DDAANN Setting up and Configuration of Excel 4 February 26th 06 12:21 PM
y-axis moves from the left hand side to the right hand side JP Excel Discussion (Misc queries) 1 March 13th 05 04:43 PM
y-axis moves from the left hand side to the right hand side! JP Charts and Charting in Excel 1 March 11th 05 12:29 AM


All times are GMT +1. The time now is 08:56 PM.

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

About Us

"It's about Microsoft Excel"