ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Send Keys (https://www.excelbanter.com/excel-programming/275034-re-send-keys.html)

Akshay Bakhai

Send Keys
 
Thanks steve, this does the trick neatly.

Thanks to all others also, your suggestions also worked
fine.

Many thanks.


-----Original Message-----
Akshay,

The following code works on the visible cells in A1:A11

Dim cel As Range
For Each cel In Range("A1:A11").SpecialCells

(xlCellTypeVisible)
Cells(13, cel.Row) = cel
Next

see if you can apply it to your needs.

--
sb
"Akshay Bakhai" wrote in message
...
I have a large list of data; on which I have applied
automatic filtering.

Thereafter, I use filter conditions on one of the

columns
only to show selected records.

Thereafter I want to automatically run down this column
and do specific actions for each value in this

column. I
am able to do everything I want EXCEPT run down this
column.

The ACTIVECELL.OFFSET(1,0) obviously gives the

physically
next record; and so is not useful.

I tried SENDKEYS "{DOWN}" to simulate pressing the down
key; but for some strange reason it takes me to the last
item in that column !!

I tried SENDKEYS "{ENTER}" to simulate pressing the

ENTER
key. But nothing happens.

Thus, currently I have to manually press enter every

time
before triggering off my macro.

Any help will be useful.

I do not want to write a FIND routine because eventually
in my filter I may set filter conditions on several

fields
and then run down a column; in which case my FIND

routines
may not be that reliable or scalable.

Many thanks



.


steve

Send Keys
 
Akshay,

You're very welcome!

--
sb
"Akshay Bakhai" wrote in message
...
Thanks steve, this does the trick neatly.

Thanks to all others also, your suggestions also worked
fine.

Many thanks.


-----Original Message-----
Akshay,

The following code works on the visible cells in A1:A11

Dim cel As Range
For Each cel In Range("A1:A11").SpecialCells

(xlCellTypeVisible)
Cells(13, cel.Row) = cel
Next

see if you can apply it to your needs.

--
sb
"Akshay Bakhai" wrote in message
...
I have a large list of data; on which I have applied
automatic filtering.

Thereafter, I use filter conditions on one of the

columns
only to show selected records.

Thereafter I want to automatically run down this column
and do specific actions for each value in this

column. I
am able to do everything I want EXCEPT run down this
column.

The ACTIVECELL.OFFSET(1,0) obviously gives the

physically
next record; and so is not useful.

I tried SENDKEYS "{DOWN}" to simulate pressing the down
key; but for some strange reason it takes me to the last
item in that column !!

I tried SENDKEYS "{ENTER}" to simulate pressing the

ENTER
key. But nothing happens.

Thus, currently I have to manually press enter every

time
before triggering off my macro.

Any help will be useful.

I do not want to write a FIND routine because eventually
in my filter I may set filter conditions on several

fields
and then run down a column; in which case my FIND

routines
may not be that reliable or scalable.

Many thanks



.





All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com