ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Move the position of spreadsheet on the screen (https://www.excelbanter.com/excel-programming/338012-move-position-spreadsheet-screen.html)

Souris

Move the position of spreadsheet on the screen
 
I would like to have my spreadsheet select a like like "AA12" and move this
cell to left upper of the screen.

I use sheets("sheets").Range("AA12").select

Ther cell wa selected, but it is located on any where on the screen.

I want to show user the data base on cell "AA12".

Is it posible to have my spreadsheet celll on the left upper of the screen?

Any infromation is great appreciated,

Rob Bovey

Move the position of spreadsheet on the screen
 
"Souris" wrote in message
...
I would like to have my spreadsheet select a like like "AA12" and move this
cell to left upper of the screen.

I use sheets("sheets").Range("AA12").select

Ther cell wa selected, but it is located on any where on the screen.

I want to show user the data base on cell "AA12".

Is it posible to have my spreadsheet celll on the left upper of the
screen?


Here's one way to do it:

Application.Goto Sheets("sheets").Range("AA12"), True

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm



sebastienm

Move the position of spreadsheet on the screen
 
You can use the Goto method of the Apllication object with Scroll parameter
set to True:
Application.Goto Destination, Scroll
Eg:
'---------------------------------------------
Sub test()
DisplayRange Range("A500")
End Sub

Sub DisplayRange(Rg As Range)
On Error Resume Next
'activate book
Rg.Parent.Parent.Activate
If Err < 0 Then 'could be hidden book
MsgBox "Cannot activate the parent book."
Exit Sub
End If
'activate sheet
Rg.Parent.Activate
If Err < 0 Then 'could be hidden sheet
MsgBox "Cannot activate the parent Sheet."
Exit Sub
End If
'Select and go to Rg
Application.Goto Rg, True
End Sub
'------------------------------------------------------
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Souris" wrote:

I would like to have my spreadsheet select a like like "AA12" and move this
cell to left upper of the screen.

I use sheets("sheets").Range("AA12").select

Ther cell wa selected, but it is located on any where on the screen.

I want to show user the data base on cell "AA12".

Is it posible to have my spreadsheet celll on the left upper of the screen?

Any infromation is great appreciated,



All times are GMT +1. The time now is 02:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com