Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Rightclicking with 'sendkeys'

Can this be done?

I need to populate a database (Oracle based) with data from Excel but to get
data into this database it involves rightclicking the column heading followed
by tab keys to enter data. I have checked to see if the 'right click' key on
the keyboard works -it doesn't - nor can any other key on the keyboard
replicate a right mouse click.

I know I can use sendkeys for the tabs but is there a sendkeys statement to
produce the equivalent of this right clicking of the column heading?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Rightclicking with 'sendkeys'

Right clicking on the column header does 2 things: it selects the column and
it opens the column context menu. Is that what you want to do via SendKeys?

Sub a()
SendKeys "^ "
SendKeys "+{F10}"
End Sub

or

Sub aa()
SendKeys "^ +{F10}"
End Sub


--
Jim
"Zakynthos" wrote in message
...
| Can this be done?
|
| I need to populate a database (Oracle based) with data from Excel but to
get
| data into this database it involves rightclicking the column heading
followed
| by tab keys to enter data. I have checked to see if the 'right click' key
on
| the keyboard works -it doesn't - nor can any other key on the keyboard
| replicate a right mouse click.
|
| I know I can use sendkeys for the tabs but is there a sendkeys statement
to
| produce the equivalent of this right clicking of the column heading?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Rightclicking with 'sendkeys'

Jim,

Yes, I do want to select the column and open the column context menu.

I tried copying/pasting both versions of your code and ran the macro but it
didn't appear to do anything?

Where could it be going wrong? Or if it won't work is there alternative
code to Sendkeys to do this?

Tony


"Zakynthos" wrote:

Can this be done?

I need to populate a database (Oracle based) with data from Excel but to get
data into this database it involves rightclicking the column heading followed
by tab keys to enter data. I have checked to see if the 'right click' key on
the keyboard works -it doesn't - nor can any other key on the keyboard
replicate a right mouse click.

I know I can use sendkeys for the tabs but is there a sendkeys statement to
produce the equivalent of this right clicking of the column heading?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Rightclicking with 'sendkeys'

Jim,

Correction to my last reply. The context menu by simulating a right click
in a column CELL with the code you gave me is a copy/delete etc list. The
window that opens when the column HEADER is rightclicked is a dialogue box in
which I want to input data. I hope this makes it clearer!

Kind regards,

Tony

"Jim Rech" wrote:

Right clicking on the column header does 2 things: it selects the column and
it opens the column context menu. Is that what you want to do via SendKeys?

Sub a()
SendKeys "^ "
SendKeys "+{F10}"
End Sub

or

Sub aa()
SendKeys "^ +{F10}"
End Sub


--
Jim
"Zakynthos" wrote in message
...
| Can this be done?
|
| I need to populate a database (Oracle based) with data from Excel but to
get
| data into this database it involves rightclicking the column heading
followed
| by tab keys to enter data. I have checked to see if the 'right click' key
on
| the keyboard works -it doesn't - nor can any other key on the keyboard
| replicate a right mouse click.
|
| I know I can use sendkeys for the tabs but is there a sendkeys statement
to
| produce the equivalent of this right clicking of the column heading?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Rightclicking with 'sendkeys'

The window that opens when the column HEADER is rightclicked is a dialogue
box in which I want to input data.


I'm sorry but it doesn't. I don't know what dialog box you're referring to.

--
Jim
"Zakynthos" wrote in message
...
| Jim,
|
| Correction to my last reply. The context menu by simulating a right click
| in a column CELL with the code you gave me is a copy/delete etc list. The
| window that opens when the column HEADER is rightclicked is a dialogue box
in
| which I want to input data. I hope this makes it clearer!
|
| Kind regards,
|
| Tony
|
| "Jim Rech" wrote:
|
| Right clicking on the column header does 2 things: it selects the column
and
| it opens the column context menu. Is that what you want to do via
SendKeys?
|
| Sub a()
| SendKeys "^ "
| SendKeys "+{F10}"
| End Sub
|
| or
|
| Sub aa()
| SendKeys "^ +{F10}"
| End Sub
|
|
| --
| Jim
| "Zakynthos" wrote in message
| ...
| | Can this be done?
| |
| | I need to populate a database (Oracle based) with data from Excel but
to
| get
| | data into this database it involves rightclicking the column heading
| followed
| | by tab keys to enter data. I have checked to see if the 'right click'
key
| on
| | the keyboard works -it doesn't - nor can any other key on the keyboard
| | replicate a right mouse click.
| |
| | I know I can use sendkeys for the tabs but is there a sendkeys
statement
| to
| | produce the equivalent of this right clicking of the column heading?
|
|
|


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SendKeys [email protected] Excel Programming 1 July 25th 05 06:05 PM
SendKeys in VBA John Excel Programming 1 June 24th 05 05:46 PM
SendKeys? CMK Excel Programming 2 February 23rd 05 12:03 AM
Sendkeys GB[_3_] Excel Programming 0 September 16th 03 10:39 PM
SendKeys Ron de Bruin Excel Programming 3 August 25th 03 10:21 PM


All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"