ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   moving active cell on another sheet (https://www.excelbanter.com/excel-programming/427902-moving-active-cell-another-sheet.html)

sunilpatel

moving active cell on another sheet
 
Is it possible to change position of activecell on another sheet.

Tried the obvious! - whilst on "Sheet1"

Sub movecell()
Sheets("Sheet2").Range("a1").Select
End Sub



Jacob Skaria

moving active cell on another sheet
 
Application.ScreenUpdating = False
Sheets("Sheet2").Activate
Sheets("Sheet2").Range("a1").Select
Sheets("Sheet1").Activate
Application.ScreenUpdating = True


If this post helps click Yes
---------------
Jacob Skaria


"sunilpatel" wrote:

Is it possible to change position of activecell on another sheet.

Tried the obvious! - whilst on "Sheet1"

Sub movecell()
Sheets("Sheet2").Range("a1").Select
End Sub




Dave Peterson

moving active cell on another sheet
 
Turn screenupdating to false,
change sheets
activate the cell
go back to where you started
turn screenupdating to true

dim CurSel as range
dim ActCell as range
application.screenupdating = false
set cursel = selection
set actcell = activecell
with worksheets("sheet9999")
.select
.range("a1").select
end with
application.goto cursel
actcell.activate
application.screenupdating = true

(Untested, uncompiled. watch for typos.)


sunilpatel wrote:

Is it possible to change position of activecell on another sheet.

Tried the obvious! - whilst on "Sheet1"

Sub movecell()
Sheets("Sheet2").Range("a1").Select
End Sub


--

Dave Peterson

Rick Rothstein

moving active cell on another sheet
 
The ActiveCell and/or Selection only applies to the active sheet. Exactly
why do you want to do this? If you really need the active cell at a certain
point on a specific sheet when the sheet is made active, you could use the
sheet's Activate event to do that selection (but I'm thinking you are asking
this question for a different reason, hence my question to you above).

--
Rick (MVP - Excel)


"sunilpatel" wrote in message
...
Is it possible to change position of activecell on another sheet.

Tried the obvious! - whilst on "Sheet1"

Sub movecell()
Sheets("Sheet2").Range("a1").Select
End Sub



Jacob Skaria

moving active cell on another sheet
 
Dear Sunil

Just curious to know what you are looking for.

What ever is seen on screen is selectable. What you are asking for is to
touch something which is not tangible. Hope you understood.....

If this post helps click Yes
---------------
Jacob Skaria


"sunilpatel" wrote:

Is it possible to change position of activecell on another sheet.

Tried the obvious! - whilst on "Sheet1"

Sub movecell()
Sheets("Sheet2").Range("a1").Select
End Sub





All times are GMT +1. The time now is 03:53 AM.

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