Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default how can one obtain the current selected cell value

If the user is on range("20c") how can I no this.
Have tried with activecell example in VBA help but does no give me any
value

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default how can one obtain the current selected cell value

VaiableX = activecell.value

"Susan Hayes" wrote:

If the user is on range("20c") how can I no this.
Have tried with activecell example in VBA help but does no give me any
value

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default how can one obtain the current selected cell value

Hi Susan,

If the user is on range("20c")

I presume you mean Range("C20") .

how can I no this.


Sub Tester()
Dim rng As Range
Set rng = ActiveCell
MsgBox rng.Address(0, 0)
End Sub

---
Regards,
Norman



"Susan Hayes" wrote in message
...
If the user is on range("20c") how can I no this.
Have tried with activecell example in VBA help but does no give me any
value

Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default how can one obtain the current selected cell value

Activecell returns the object that is the active cell. This object has many
properties that you can interrogate.

For instance, ACtivecell.Value will give you the actual value in that cell.
Activecell.Text will give you the text in that cell (for instance, if you
have a value of 1 in a cell, but it is formatted as currency, this will give
the text value of $1.00 as seen on the worksheet)
Activecell.Address gives the address string of that cell, such as $A$1.

There are many others, take a look at 'Range Object' in VBA help (Activecell
is just a specific example of a range), and look at the properties
associated with it to find out about more.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Susan Hayes" wrote in message
...
If the user is on range("20c") how can I no this.
Have tried with activecell example in VBA help but does no give me any
value

Thanks




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
Macro to run relative to current selected cell MahD Excel Discussion (Misc queries) 3 December 11th 06 06:18 AM
Obtain last four characters from a cell. mohd21uk via OfficeKB.com Excel Discussion (Misc queries) 3 May 17th 06 02:13 PM
How do I obtain total for auto filter value selected ? FLo Excel Discussion (Misc queries) 1 November 22nd 05 03:08 PM
Excel should enlarge the current selected row for easy reading Office_Power_User Excel Worksheet Functions 1 September 21st 05 09:00 PM
plotting chart with user selected range from current workbook annette2002 Excel Programming 0 June 5th 04 03:16 AM


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