Hi All,
Quick question...(this problem can't be as hard as it's turning out to be, right?)
Let's say you perform a copy command of a cell on a specific sheet of an excel workbook.
Is there some kind of way in MS14 to get and store the address or coordinates of the copied cell as a variable for later reference?
(I honestly thought this would be cake, but I scoured the forum for about 90 minutes and found nothing to suited my needs. I must be asking it the wrong way because I would think this is a routine exercise for a macro.)
Thanks,
R.J.
Get the "address" or coordinates of a cell in excel...
Moderators: JRL, Dorian (MJT support)
Re: Get the "address" or coordinates of a cell in excel...
Please disregard this post unless you want to keep it up for others who may ask. Or flag it as "Solved".
I must be getting punchy. I looked through the forums again and found this almost instantly.
(*Many thanks to JRL and hagchr who both presented options that worked. Below is hagchr's code...)
Works exquisitely...
I must be getting punchy. I looked through the forums again and found this almost instantly.
(*Many thanks to JRL and hagchr who both presented options that worked. Below is hagchr's code...)
Code: Select all
VBSTART
Dim objExcel
Sub GetExcel
Set objExcel = GetObject( , "Excel.Application")
End Sub
VBEND
VBRun>GetExcel
VBEval>objExcel.ActiveSheet.Name,Sheet
VBEval>objExcel.ActiveCell.Address,Cell
MessageModal>Sheet: %Sheet%%CRLF%Cell: %Cell%
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
Re: Get the "address" or coordinates of a cell in excel...
Vey useful info. Thanks for posting.
Phil Pendlebury - Linktree