Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
Lee Lee is offline
external usenet poster
 
Posts: 3
Default retrieve Active cell "Name" vbscript

I'm not sure if this is the right group or not,

I have a vbscript that opens and excel spreadsheet and does some work on it.

I need to be able to add a formula to a cell like "=A1+A2" , but I need to
know which cell I am in in order to add the formula

I know objXL.activeSheet.Range("A1").activate will point me to cell "A1".
then I move down through the sheet. using
objXL.activecell.offset(1,0).activate which moves me down a row,

what I really need is a way to find out "where I am" after the script moves.

is there a function that will return "B1" when I'm on the second row?


  #2   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
external usenet poster
 
Posts: 1
Default retrieve Active cell "Name" vbscript


"Lee" wrote in message
...
I'm not sure if this is the right group or not,

I have a vbscript that opens and excel spreadsheet and does some work on
it.

I need to be able to add a formula to a cell like "=A1+A2" , but I need to
know which cell I am in in order to add the formula

I know objXL.activeSheet.Range("A1").activate will point me to cell
"A1".
then I move down through the sheet. using
objXL.activecell.offset(1,0).activate which moves me down a row,

what I really need is a way to find out "where I am" after the script
moves.

is there a function that will return "B1" when I'm on the second row?


If I recall correctly then objExcel.ActiveCell.Address will return the
current cell address.


  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
external usenet poster
 
Posts: 7,247
Default retrieve Active cell "Name" vbscript

ActiveCell refers to the current active cell, wherever it might be.
ActiveCell.Address returns a string containing the address of the
ActiveCell.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)

On Thu, 19 Feb 2009 10:24:17 -0500, "Lee"
wrote:

I'm not sure if this is the right group or not,

I have a vbscript that opens and excel spreadsheet and does some work on it.

I need to be able to add a formula to a cell like "=A1+A2" , but I need to
know which cell I am in in order to add the formula

I know objXL.activeSheet.Range("A1").activate will point me to cell "A1".
then I move down through the sheet. using
objXL.activecell.offset(1,0).activate which moves me down a row,

what I really need is a way to find out "where I am" after the script moves.

is there a function that will return "B1" when I'm on the second row?

  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
Lee Lee is offline
external usenet poster
 
Posts: 3
Default retrieve Active cell "Name" vbscript

perfect.
thanks..

I

"Pegasus (MVP)" wrote in message
...

"Lee" wrote in message
...
I'm not sure if this is the right group or not,

I have a vbscript that opens and excel spreadsheet and does some work on
it.

I need to be able to add a formula to a cell like "=A1+A2" , but I need
to know which cell I am in in order to add the formula

I know objXL.activeSheet.Range("A1").activate will point me to cell
"A1".
then I move down through the sheet. using
objXL.activecell.offset(1,0).activate which moves me down a row,

what I really need is a way to find out "where I am" after the script
moves.

is there a function that will return "B1" when I'm on the second row?


If I recall correctly then objExcel.ActiveCell.Address will return the
current cell address.

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
Highlighting the active cell during "Find" joflo65 Excel Discussion (Misc queries) 0 September 19th 08 05:54 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
how do I change color of "active" cell to differentiate from rest devildog97 Excel Discussion (Misc queries) 9 May 1st 08 03:25 PM
VBA statement "scroll active cell to center"??? Fred Holmes Excel Programming 2 November 16th 07 10:14 PM
"outline active cell differently than other cells" terri Excel Discussion (Misc queries) 1 January 25th 06 08:26 PM


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