Hi All,
I'm trying to use sendkeys to paste records from the database into a another application. I am able to make Sendkeys work as a macro in access, but the problem is that the keystrokes have to be a variable equal to the record's patient number..
I tried to use sendkeys in vb but it seems vb doesnt recognize the command.. Function Macro2()
SendKeys "patient 2215", False
End Function When I try to run it, an error message comes up "Compile Error: Expected variable or procedure, not project"
Please let me know how to fix this.
Thanks and Regards!
2 7332
Hi All,
I'm trying to use sendkeys to paste records from the database into a another application. I am able to make Sendkeys work as a macro in access, but the problem is that the keystrokes have to be a variable equal to the record's patient number..
I tried to use sendkeys in vb but it seems vb doesnt recognize the command.. Function Macro2()
SendKeys "patient 2215", False
End Function When I try to run it, an error message comes up "Compile Error: Expected variable or procedure, not project"
Please let me know how to fix this.
Thanks and Regards!
Try it this way:
SendKeys "patient 2215 {Enter}", False
If the above does not work and your prior macros put you in the application window, try using sendkeys to tab to the patient number field and then send the patient number
Function Macro2()
SendKeys "{Tab} {Tab} {Tab}" 'this is just an example
SendKeys "2215 {Enter}", False
End Function
Hi All,
I'm trying to use sendkeys to paste records from the database into a another application. I am able to make Sendkeys work as a macro in access, but the problem is that the keystrokes have to be a variable equal to the record's patient number..
I tried to use sendkeys in vb but it seems vb doesnt recognize the command.. Function Macro2()
SendKeys "patient 2215", False
End Function When I try to run it, an error message comes up "Compile Error: Expected variable or procedure, not project"
Please let me know how to fix this.
Thanks and Regards!
SendKeys can only send Keystrokes to the Active Window. If you are sending Keystrokes to an External Application, you'll have to make sure it is active, as in: -
Dim ReturnValue
-
ReturnValue = Shell("<External App>", 1)
-
AppActivate ReturnValue ' Activate the External Application
-
-
'Now, try SendKeys
Sign in to post your reply or Sign up for a free account.
Similar topics
by: David Kanter |
last post by:
Hello,
I have a question regarding SendKeys(). I am working on a small VB .Net
script that manipulates/automates programs through SendKeys().
Unfortunately, I have run into several problems. ...
|
by: Mr. Bungle |
last post by:
I would like to send email automatically via a command button. I have
accomplished this just fine through the following code: (Outlook
should already be open for reliable results)
Private Sub...
|
by: RBohannon |
last post by:
I need to create a report in MS Word populated with data from A2K. I
have been asked to create the report in Word so that parts of it can be
edited as necessary later. The data in the report are...
|
by: Mike |
last post by:
I want to be able to open the printer popup screen while a report is on
the screen.
I would like to have a button on one of the menus that sends the
"control P" combination.
In the past, I...
|
by: Wayne Gibson |
last post by:
Hi,
Was wondering if somebody could help.. I'm trying to use Sendkeys on a
Windows forms.
I have entered the following command to simulate a CTRL+ALT+1..
...
|
by: Bryan |
last post by:
I am writing a C# Windows App that updates out Excel reports' modules. The
app is complete, but has a problem. The only way MS allows you to unprotect
the VBA code in Excel is to do it by hand or...
|
by: David Kanter |
last post by:
Hi,
I am relatively inexperienced with VB.Net, but I am familiar with many
concepts from programming; I have some basic level of competence with C/C++
and Perl, but I just started using VB this...
|
by: Michael Maes |
last post by:
Hello,
I'm invoking successive
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
in a loop.
The issue is that it causes a Beep on every Pass.
Setting the 'Handled = True' on...
|
by: neonspark |
last post by:
I'm buidling some simple macro functionality for my app so the users can record a sequence of keyboard inputs and replay them reliably via some menu.
Originally, I used:
protected override bool...
|
by: jairathore |
last post by:
Hi,
I m working on a project on which my requirment is like that remotely i control another application by using sendkey.sendwait method, i m sending some keystroke to that application and...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |