Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How would I code Ctrl+A ?

Status
Not open for further replies.

Recce

Programmer
Aug 28, 2002
425
ZA
Good day,

I am not good with codeing keys and was hoping someone could help me with code Ctrl+A and Ctrl+C Would anyone be able to help me with something like this ? Thanks :)

[pipe] "We know nothing but, that what we know is not the truth..." - Me
 
?? When you press these buttons, which control should respond? A textbox, no matter the focus; the form?
 
Reece,
If you are refering to sending keyboard strokes or presses then you could try the following
SendKeys.Send("^A")
or
SendKeys.Send("^+A")

cheers,
Infacta

 
When using SendKeys, make sure you import System.Windows.Forms at the top of your code.
Code:
Imports System.Windows.Forms

Regards,

Joel
 
Hi everyone,

Thanks for all the suggestions and I will certainly make use of them. Maybe I should give some more details as to why I want to code key strokes. I have an Office Web Component Pivot table in an HTML. Now I would like to export the data in the Pivot Table as a .csv to my system but, I do not know exactly how to do that but, I know that I will manage by codeing Ctrl-A and the go Ctrl-C in Excel. That way I will have the data in Excel. I will make use of the above suggestions but, if anyone knows how to do this in VBScript then, it will help even more. Thanks again :)

[pipe] "We know nothing but, that what we know is not the truth..." - Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top