Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2007

Tip: Looking for answers? Try searching our database.

Assigning VBA.SendKeys ("^v") to a variable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruce Maston - 22 May 2007 14:38 GMT
After you use VBA.SendKeys ("^c") to capture data in a textbox, is there a
way to assign this information to a variable?

A simple line of code strVariable = VBA.SendKeys ("^v") gets a compile error
"expected function or variable"

Thank you.
Mr. B - 22 May 2007 16:27 GMT
On May 22, 8:38 am, Bruce Maston
<homeb...@NOSPAMmalpracticedepositions.com> wrote:
> After you use VBA.SendKeys ("^c") to capture data in a textbox, is there a
> way to assign this information to a variable?
[quoted text clipped - 3 lines]
>
> Thank you.

Bruce,

Take a look at using the Clipboard through code as opposed to using
the sendkeys function.  Take a look at:

http://www.mvps.org/access/api/api0049.htm

While the sendkeys my seem like a good approach, actually it can have
problems.  The best bet is the clipboard.

If you just need to hold on to the value of a textbox, you could just
use a variable as in:

dim strMyVal as String
strMyVal = me.NameOfTexbox

Hope this helps.

Mr. B
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.