on 02-13-2013 2:58 PM
Hey there!
I have a problem, which makes me really sick!
My scriptrecording is definitely not recording one special command, see this picture:
All other commands in this contextmenu are recorded. only the first one not. i tryed to guess the command, tryed to use "©" or "©TEXT" and so on, but did not work.
Here is the Code:
.findById("wnd[0]/usr/cntlALV_CONTAINER/shellcont/shell").selectColumn "AUFNR"
.findById("wnd[0]/usr/cntlALV_CONTAINER/shellcont/shell").contextMenu
.findById("wnd[0]/usr/cntlALV_CONTAINER/shellcont/shell").selectContextMenuItem "©"
The parameter in the last row does not work. What can i do, if my scriptrecording is not recording an important command? how do i get the name of the items of the contextmenu?
Or how can i copy the text? I also tried Application.SendKeys "^c" .... not working.
Thanks for your help!
Kind regards from Bavaria.
Hello Maximilian,
it is very interesting.
Try this to solve your problem:
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").contextMenu
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectContextMenuItemByPosition "0"
Or this:
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").contextMenu
session.findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectContextMenuItemByText "Text kopieren"
Let us know the result.
Cheers
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stefan,
it worked so far... but one thing is annoying:
If i paste the Values in my Sheet with:
Range("A" & startRow).PasteSpecial
... it always cuts off the last digit number.
But if i paste it manual (with strg+v) ... it works. what is happening there?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok.... now it works. Dont know why. Now i use:
Range("A" & startRow).PasteSpecial skipblanks:=True
Crazy VBA
Thanks so far!!! You helped me a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.