|
-
Jul 22nd, 2005, 05:55 PM
#1
Thread Starter
Junior Member
copy
hi
new to vba.
if i have a textbox on a form in access (2000) and a button called 'copy', which command do i place behind this button to copy the contents of the textbox to my clipboard?
ive tried .copy
is it something to do with the do.cmd?
-
Jul 23rd, 2005, 07:50 PM
#2
Re: copy
Try this:
VB Code:
Private Sub mnuCopy_Click ()
Clipboard.Clear
Clipboard.SetText Text1.SelText
End Sub
EDIT: Oh, just noticed that you wanted to use VBA. Not sure if that will work, try using HELP.
Last edited by dglienna; Jul 23rd, 2005 at 07:54 PM.
-
Jul 24th, 2005, 01:21 AM
#3
Re: copy
Nope, no Clipboard in Access. Your code is VB6 Dglienna. Only the Office Clipboard via the DoCmd method.
VB Code:
Private Sub BtnCopy_Click()
Me.txtTextBox.SelStart = 0
Me.txtTextBox.SelLength = Len(Me.txtTextBox.Text)
DoCmd.RunCommand acCmdCopy 'Copies the selected contents of txtTextbox control
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 24th, 2005, 04:23 PM
#4
Thread Starter
Junior Member
Re: copy
thanks people, that did it.
:-)
-
Jul 24th, 2005, 04:25 PM
#5
Thread Starter
Junior Member
-
Jul 24th, 2005, 08:24 PM
#6
Re: copy
You can 'Resolve' a thread by going to the Thread Tools menu and selecting 'Resolve Thread'. 
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|