Click OK Button and Menue at CRM software

Jacky81

New Member
Joined
Aug 29, 2011
Messages
4
Hello,

I want to open a CRM Programm and to extract the datas to Excel

I have following code:

Sub OpenWindowsExplorer()

ActiveWorkbook.FollowHyperlink "F:\DeltaLine\swing\DLN.spkg",

End Sub

The file F:\DeltaLine\Swing\DLN.spkg should be open and then comes a office msg the datas could have virus would you open, this should be clicked OK and then comes a field to enter the passwort (xxxxxx) this should be fulfill automatically and click OK.
Then it should jump to the top menu line, there is the word "Strumenti" and there it should select the line "Invia ad Excel" and click OK.
Then it extrct the files in Excel and I could work with them.
Thanks.
 
Last edited:

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
makes it a bit hard (unless you can access the api for it) but the only way I can think of would be the send keys method. this sends whatever you wish to the active application on screen.
ie:

Code:
SendKeys ("hi")
this will print hi on the active program, you would need to send the enter key or Y key if it has a shortcut.

Code:
SendKeys ({ENTER})

will do enter key
Code:
SendKeys ("Y")
 
Upvote 0
My complete code looks like that, but it doesn't work.
Also not with

SendKeys ({ENTER})</pre>
Code:
Sub OpenWindowsExplorer()
     
    ActiveWorkbook.FollowHyperlink "F:\DeltaLine\swing\DLN.spkg", NewWindow:=True
Application.SendKeys "{LEFT}{ENTER}", True
End Sub
 
Upvote 0
My complete code looks like that, but it doesn't work.
Also not with


SendKeys ({ENTER})
</PRE>
Code:
Sub OpenWindowsExplorer()
 
    ActiveWorkbook.FollowHyperlink "F:\DeltaLine\swing\DLN.spkg", NewWindow:=True
Application.SendKeys "{LEFT}{ENTER}", True
End Sub

try changing the bottom line to be

Code:
SendKeys ({LEFT} & {ENTER}), True
 
Upvote 0
Sendkeys should always be your last choice to solve a problem. It requires focus and timing to work if at all. UAC must be turned off if Vista+.

Here is another SendKeys method:
Code:
Sub test2() 
    Dim keys As String 
    Dim wsh As Object 
    AppActivate "Notepad" 
    Application.Wait Now() + TimeValue("00:00:02") 
    keys = "%f" 
    Set wsh = CreateObject("WScript.Shell") 
    wsh.SendKeys keys, True 
    Set wsh = Nothing 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top