Use Excel VBA to control program open via Citrix

ExcelVBAJunkie

New Member
Joined
Jan 10, 2014
Messages
2
Hello,

Using Excel VBA I am trying to use “SendKeys” to send keystrokes to a program that was opened via Citrix. The program via Citrix is open and running actively on my computer. I am trying to use Excel to send commands to the program.

Steps I normally do. Go to Citrix and select the program I want to use. Program log in screen pops up at which point I log in using my credentials. Once logged in, I select “F10” on my keyboard to access the menu. Next I select a letter such as “s” from the keyboard which prompts the program to open a menu.</SPAN>


With Excel open locally on my machine I am attempting to send the “F10” and “s” keys but it is not registering on the program. When I do it manually via the keyboard everything works as expected. I attempted to install Excel on Citrix and run both Excel and the other program via Citrix. To my surprise the “SendKeys” commands all work. The problem is that I can’t keep Excel on the Citrix environment. I have to use the local Excel program to accomplish these steps.</SPAN>

The following commands are what I’m using…</SPAN>

Public Sub PullAndSetUp_Master_Schedule_ForEdits()</SPAN>

Application.Wait (Now + TimeValue("0:00:01"))</SPAN>
SendKeys "{F10}", True</SPAN>
DoEvents</SPAN>
SendKeys "{s}", True</SPAN>
DoEvents</SPAN>
SendKeys "{m}", True</SPAN>
DoEvents</SPAN>

End Sub</SPAN>

I searched for threads all over and have found others that are having the same issue but none of the threads have any solutions via VBA.</SPAN>

Thank you in advance for any help you are able to provide.</SPAN>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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