Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Position of Cell on Screen

Excel 2000
I am using variations (different chart names) of the following code to
size and position a series of imbedded charts (in one worksheet) on
screen such that they display exactly on top of each other. This code
is attached to a forms command button in another worksheet to execute
the code. Works great. Now I need to do a similar thing within a
different worksheet, but instead of a chart, I want to use three merged
cell ranges: B1:BA1, B33:BA33, and B65:BA65 as the point to be
located at, say, Top = 10, Left = 150. I do not want to resize, just
have the cell go to 10/150. How this should work: user clicks the
button and cell range B33 moves to 10/150, for example. In this B33
example, I would call the macro DisplayB33.

Seems the code should be simple and straightforward, but I can’t figure
out how to do it. Tried the macro generator to no avail. Can someone
help with the code?

Sub GoToMetric6()
Application.ScreenUpdating = False
Sheets("Metrics").Select
ActiveWindow.Zoom = 57
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 56")
..Height = 660
..Width = 780
..Top = 10
..Left = 150
..BringToFront
End With
Application.ScreenUpdating = True
End Sub


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Position of Cell on Screen

You have a followup in your other thread.

"pjhageman <" wrote:

Excel 2000
I am using variations (different chart names) of the following code to
size and position a series of imbedded charts (in one worksheet) on
screen such that they display exactly on top of each other. This code
is attached to a forms command button in another worksheet to execute
the code. Works great. Now I need to do a similar thing within a
different worksheet, but instead of a chart, I want to use three merged
cell ranges: B1:BA1, B33:BA33, and B65:BA65 as the point to be
located at, say, Top = 10, Left = 150. I do not want to resize, just
have the cell go to 10/150. How this should work: user clicks the
button and cell range B33 moves to 10/150, for example. In this B33
example, I would call the macro DisplayB33.

Seems the code should be simple and straightforward, but I can’t figure
out how to do it. Tried the macro generator to no avail. Can someone
help with the code?

Sub GoToMetric6()
Application.ScreenUpdating = False
Sheets("Metrics").Select
ActiveWindow.Zoom = 57
Range("A1").Select
With ActiveSheet.ChartObjects("Chart 56")
Height = 660
Width = 780
Top = 10
Left = 150
BringToFront
End With
Application.ScreenUpdating = True
End Sub

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

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
Position screen at end of macro Kevryl Excel Discussion (Misc queries) 3 June 3rd 10 06:54 AM
Can I fix the position of an object on the screen? Bob Arnett Excel Discussion (Misc queries) 0 October 27th 09 05:46 PM
screen position indication? nastech Excel Discussion (Misc queries) 1 August 17th 06 07:55 PM
Screen position after hyperlinking Lauri S. Excel Discussion (Misc queries) 0 March 29th 06 04:41 PM
Move Cell to Top/Left Position on Screen Phil Hageman[_3_] Excel Programming 4 January 10th 04 07:24 PM


All times are GMT +1. The time now is 01:48 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"