Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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? | | | |