Hi Guys i'm writing a macro in excel that need a down arrow send at one point. Below is the script

Sheets("1").Select
Range("A4").Select
Selection.End(xlDown).Select
Sheets("2").Select
Range("A4").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("1").Select
ActiveSheet.Paste
Selection.End(xlDown).Select
SendKeys ("DOWN") ' I need to send the down arrow here'

How do i do it
Rgds,

Recommended Answers

All 9 Replies

You need to embrace the word DOWN in braces: SendKeys("{DOWN}").
SendKeys Reference

it still Dosent work, the send down dosen't happen, any idea's

Have you tried debugging?
Do you get any error messages?

Nope, No errors..

Ok.
I tried this out myself.
Replace the SendKeys line with: Application.SendKeys "{DOWN}", True

Ok.
I figured it out.
Replace all instances of SendKey "{DOWN}" with this line: ActiveCell.Offset(1, 0).Select

Fantastic. It works.. Thanks Bro. Thats 1 Hours work reduced to a few seconds.God Bless you

You're very welcome. :)
Please remember to mark this thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.