|
-
Jun 1st, 2006, 07:38 AM
#1
Thread Starter
New Member
[RESOLVED] Excel: Determining Active Cell Position
I am writing a VB Excel Macro and I am using the following code to determine the position of the active cell.
VB Code:
Dim InitialRow As Integer
Dim InitialColumn As String
InitialRow = ActiveCell.Row
InitialColumn = ActiveCell.Column
The problem is ActiveCell.Column returns an integer (i.e. it returns 3 instead of C). Does anyone know a way to return a C, or to convert the 3 to a C)?
If someone knows a function to return the full cell name (Column & Row instead of Column and Row individually), that would also work.
The reason that this is a problem is because I want to select this cell later using the function Range(<Cell>).Select, where Cell = String & Integer
Last edited by braabe01; Jun 1st, 2006 at 07:46 AM.
-
Jun 1st, 2006, 07:56 AM
#2
Re: Excel: Determining Active Cell Position
VB Code:
MsgBox ActiveCell.Address
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 1st, 2006, 08:01 AM
#3
Re: Excel: Determining Active Cell Position
Excel VBA question moved to Office Development
-
Jun 1st, 2006, 08:06 AM
#4
Re: Excel: Determining Active Cell Position
Just for future info - I think there is a function in Excel that converts r1c1 address to the 'normal' address... Cannot remember what it was though, should be in the helpfiles or under intellisense of
Although R1c1 makes more sense...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|