![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
excuse my english!!!
if sendkey allow to send key to active window as from keyboard, why using sendkeys as the bolow example (in a Excel module) SendKeys "%F", True SendKeys "{DOWN}", True SendKeys "{ENTER}", True SendKeys "ciao", True the fourth row don't write ciao in the fileopen window? I think but I'm not sure that active window is excel as for row number 1, 2 and 3; and it remain for row number 4 instead of open file windows. Thank for your time. Simone |
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary Canada
Posts: 222
|
Hi,
about your question: I had a problem like it but when I put this code before "sendkey", it worked. put this code before line 4: '''''''''''''''''''''''' AppActivate Return_Value SendKeys "ciao", True ''''''''''''''''''''''''''' where "Return_Value" is a Double representing the program's task ID.("Shell", returns this ID,if successful) also I think you want open a file. if it is true, why do you use Ctrl+O? SendKeys "^{O}", True Good Luck Hamid |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: SRC
Posts: 165
|
This is a much better way to oen a file
Sub xcxcx() ss = Application.GetOpenFilename("ciao (*.xls),*.xls") MsgBox ss End Sub |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|