Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Saving and returning to saved screen view? (Pan L/R U/D)

OK. So here's what I have. I click a cell, and a
selection change macro turns the cell value to "X" or ""
(toggles). Then it returns me to like range "B3", or
somewhere close to that. The problem is, part of where
this "X"ing macro is, may be far off to the right, and I
want the user to still be looking at where he clicked,
once the new value has been set to "X" or "", but I still
want the cell "B3" to be selected. Is there anyway to
save where the screen is panned over/up to before the
macro and then return it to that same view after? Help is
appreciated, as always! Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Saving and returning to saved screen view? (Pan L/R U/D)

Try this. The first part stores the current cursor location (active cell),
your macro runs, then the last part takes you back to the stored location.
Is this what you need?

Dim cLoc As String
cLoc = ActiveCell.Address

'Your macro here that moves / scrolls the sheet to some other place

Application.Goto Reference:=Range(cLoc)


Cheers
Nigel


"Wandering Mage" wrote in message
...
OK. So here's what I have. I click a cell, and a
selection change macro turns the cell value to "X" or ""
(toggles). Then it returns me to like range "B3", or
somewhere close to that. The problem is, part of where
this "X"ing macro is, may be far off to the right, and I
want the user to still be looking at where he clicked,
once the new value has been set to "X" or "", but I still
want the cell "B3" to be selected. Is there anyway to
save where the screen is panned over/up to before the
macro and then return it to that same view after? Help is
appreciated, as always! Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Saving and returning to saved screen view? (Pan L/R U/D)

THANK YOU!
exactly what I was looking for.
-----Original Message-----
Try this. The first part stores the current cursor

location (active cell),
your macro runs, then the last part takes you back to the

stored location.
Is this what you need?

Dim cLoc As String
cLoc = ActiveCell.Address

'Your macro here that moves / scrolls the sheet to some

other place

Application.Goto Reference:=Range(cLoc)


Cheers
Nigel


"Wandering Mage"

wrote in message
...
OK. So here's what I have. I click a cell, and a
selection change macro turns the cell value to "X" or ""
(toggles). Then it returns me to like range "B3", or
somewhere close to that. The problem is, part of where
this "X"ing macro is, may be far off to the right, and I
want the user to still be looking at where he clicked,
once the new value has been set to "X" or "", but I

still
want the cell "B3" to be selected. Is there anyway to
save where the screen is panned over/up to before the
macro and then return it to that same view after? Help

is
appreciated, as always! Thank you.



.

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
Screen view T Rev Excel Discussion (Misc queries) 2 February 8th 10 01:29 PM
view excel in full screen view JABCR Excel Worksheet Functions 1 April 25th 09 12:39 AM
HOW FIX EXCEL WHERE PRINT VIEW IS DIFFERENT FROM SCREEN VIEW Greenlight Excel Discussion (Misc queries) 0 March 19th 09 12:00 AM
Row always in screen view utcam03 Excel Discussion (Misc queries) 4 February 2nd 07 02:37 PM
same screen view frendabrenda1 Excel Discussion (Misc queries) 2 September 9th 05 02:23 PM


All times are GMT +1. The time now is 10:17 AM.

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"