Ok, so. First time poster but I Love AHK, been using it alot the last year and gotten lots of work done.
Anyhow. Ive started using COM to work with Excel, but Im still pretty stupid about it.
I know I can select a cell with for example:
XL.Range("B2").Select
But how do I give the select function the current cell, +1 in row? So say I have B2 selected, I want to select B3. Or if D10 is currently selected, I want to select D11.
I dont understand how to pass the current cell information into the Range().Select function.
I want to do something like XL.Range(CurrentCellRow+1).Select
Thanks.
Excel COM - Select cell under current active cell Topic is solved
Re: Excel COM - Select cell under current active cell
Hi
Here's a link to a recent topic that is almost identical. It moves the selection one to the right, but going one down would be similar. (Use .Offset(1, 0) instead of .Offset(0, 1).)
More related links:
Here's a link to a recent topic that is almost identical. It moves the selection one to the right, but going one down would be similar. (Use .Offset(1, 0) instead of .Offset(0, 1).)
More related links:
-
- Posts: 2
- Joined: 20 Apr 2017, 19:23
Re: Excel COM - Select cell under current active cell
Hi Kon.
Great, got it working now. Thanks.
On an unrelated topic, I need to run the script as administrator. But running the script using COM as administrator causes an error, stupidly enough. You have any idea how to fix this?
Great, got it working now. Thanks.
On an unrelated topic, I need to run the script as administrator. But running the script using COM as administrator causes an error, stupidly enough. You have any idea how to fix this?
-
- Posts: 2
- Joined: 20 Apr 2017, 19:23
Re: Excel COM - Select cell under current active cell
Nevermind.
Running both the script and excel in admin mode seems to be working fine.
Running both the script and excel in admin mode seems to be working fine.
Who is online
Users browsing this forum: imstupidpleshelp, JoeWinograd, mikeyww, ositoMalvado, Rohwedder, usser and 201 guests