Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveCell
Get a funny problem which was working.
Have the following. I enter 3453 in C15. in VB have the following Dim InputRange as Range Set InputRange = Activecell This should return C15 (or the active cell address). Instead it keeps returning 3453. This was working previously - any ideas - only thing I can think of is the Excel is 2003-SR1 Desperate to get this working Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveCell
Your provided code does not return anything, it sets a range, which works,
as in: Sub Test() Dim InputRange As Range Set InputRange = ActiveCell Range("C14").Select MsgBox "Will return from C14 to InputRange now." InputRange.Select End Sub What I suspect that you do is not defining which property to use, like MsgBox InputRange That lazy coding is only acceptable if you know the object model extremely well and don't share co de with others. You expect the Address property in return, but what you get is the Value property if you leave it out: MsgBox InputRange.Address MsgBox InputRange.Value MsgBox InputRange.Font.Name HTH. Best wishes Harald skrev i melding oups.com... Get a funny problem which was working. Have the following. I enter 3453 in C15. in VB have the following Dim InputRange as Range Set InputRange = Activecell This should return C15 (or the active cell address). Instead it keeps returning 3453. This was working previously - any ideas - only thing I can think of is the Excel is 2003-SR1 Desperate to get this working Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveCell
It is defaulting to the Value.
InputRange.Value should give 3453 and InputRange.Address should give C15 -- Gary's Student " wrote: Get a funny problem which was working. Have the following. I enter 3453 in C15. in VB have the following Dim InputRange as Range Set InputRange = Activecell This should return C15 (or the active cell address). Instead it keeps returning 3453. This was working previously - any ideas - only thing I can think of is the Excel is 2003-SR1 Desperate to get this working Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
if activecell is value | Excel Programming | |||
IF ACTIVECELL contains | Excel Programming | |||
Name the ActiveCell | Excel Programming | |||
activecell | Excel Programming |