PC Review


Reply
Thread Tools Rate Thread

active cell - get me back there

 
 
oldyork90
Guest
Posts: n/a
 
      10th Jun 2008
NOT a vba guy... macros

I have on that does a lot of formating of a sheet. I want to return
to the cell that was active after the
formating macro is complete. I opened up the macro editor and tried
something like

a = activecell

then later on

a.activate

Thank you.
 
Reply With Quote
 
 
 
 
Gary Brown
Guest
Posts: n/a
 
      10th Jun 2008
Dim strOriginalAddress As String

strOriginalAddress = ActiveCell.Address
'do stuff
Range(strOriginalAddress).Select

Hope this helps,
Gary Brown


"oldyork90" wrote:

> NOT a vba guy... macros
>
> I have on that does a lot of formating of a sheet. I want to return
> to the cell that was active after the
> formating macro is complete. I opened up the macro editor and tried
> something like
>
> a = activecell
>
> then later on
>
> a.activate
>
> Thank you.
>

 
Reply With Quote
 
Jim Thomlinson
Guest
Posts: n/a
 
      10th Jun 2008
You are close. You want to store the activesheet and the active cell. So
something like this perhaps...

dim wks as worksheet
dim rng as range

set wks = activesheet
set rng = activecell

'your code here

wks.select
rng.select

--
HTH...

Jim Thomlinson


"oldyork90" wrote:

> NOT a vba guy... macros
>
> I have on that does a lot of formating of a sheet. I want to return
> to the cell that was active after the
> formating macro is complete. I opened up the macro editor and tried
> something like
>
> a = activecell
>
> then later on
>
> a.activate
>
> Thank you.
>

 
Reply With Quote
 
oldyork90
Guest
Posts: n/a
 
      10th Jun 2008
On Jun 10, 7:30 am, Gary Brown
<g.brown.takethispartouttocontac...@kinneson.com> wrote:
> Dim strOriginalAddress As String
>
> strOriginalAddress = ActiveCell.Address
> 'do stuff
> Range(strOriginalAddress).Select
>
> Hope this helps,
> Gary Brown
>
> "oldyork90" wrote:
> > NOT a vba guy... macros

>
> > I have on that does a lot of formating of a sheet. I want to return
> > to the cell that was active after the
> > formating macro is complete. I opened up the macro editor and tried
> > something like

>
> > a = activecell

>
> > then later on

>
> > a.activate

>
> > Thank you.


Thank you both. Works as if I paid for it. :-)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row select mode to highlight active row of active cell Bart Fay Microsoft Excel Misc 0 11th May 2010 09:34 PM
How to make active cell border prominent and keep entire active row selected for better visibility Radhika Microsoft Excel Programming 2 30th Dec 2008 08:51 AM
run macro although blinking cursor is active in an active cell bartman1980 Microsoft Excel Programming 1 20th Dec 2007 11:29 AM
referring to formula in a non active cell from active cell nickname Microsoft Excel Misc 1 21st Jun 2007 12:11 PM
Writing Macro - How to get the cursor/Active Cell back to top of W =?Utf-8?B?TWljaGVsZS5OZXh0ZWw=?= Microsoft Excel Programming 1 17th Feb 2005 03:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 PM.