|
-
Aug 13th, 2003, 12:19 AM
#1
Thread Starter
New Member
cut/copy/paste does not work
Hi, im developing a small app (my first app). well, the thing is that i can't copy, cut or paste any text unless i do it using the menu that appears when right clicking the selected text. If i use the buttons on the menu (Edit -> cut, copy, paste), the buttons on the bar (the little icons) or the shortcuts i assigned (ctrl + c, etc.) then copy/cut/paste won't work.
I genereted this app (MDI app by the way) using the VBA wizard. Here's the genereted code for each action:
Cut:
Private Sub mnuEditarCortar_Click()
On Error Resume Next
Clipboard.SetText ActiveForm.rtfText.SelRTF
ActiveForm.rtfText.SelText = vbNullString
End Sub
Copy:
Private Sub mnuEditarCopiar_Click()
On Error Resume Next
Clipboard.SetText ActiveForm.rtfText.SelRTF
End Sub
Paste:
Private Sub mnuEditarPegar_Click()
On Error Resume Next
ActiveForm.rtfText.SelRTF = Clipboard.GetText
End Sub
Removing the command "On Error Resume Next" i get the following error when trying to copy a selected text:
Run-time error '438':
Object doesn't support this property or method
So, can anyone help me please?
Thanks
-
Aug 13th, 2003, 11:09 AM
#2
Hyperactive Member
what are you doing this in???
-
Aug 13th, 2003, 05:22 PM
#3
Thread Starter
New Member
what are you doing this in???
Im devolping my app using Visual Basic 6.0
-
Aug 14th, 2003, 09:29 AM
#4
Hyperactive Member
i did this in Access VBA
----------------------------------------------------
Dim fso As Object
Set fso = CreateObject("scripting.filesystemobject")
'copy the file from, to
fso.CopyFile "H:\USERS\GROUPS\CLAIMS\Reports_from_Data_Analyst\Blocker\Current\*.xls", "H:\USERS\GROUPS\CLAIMS\Reports_from_Data_Analyst\Blocker\"
'delete the file from the old location
fso.deletefile "H:\USERS\GROUPS\CLAIMS\Reports_from_Data_Analyst\Blocker\Current\*.xls"
-
Aug 14th, 2003, 09:51 PM
#5
Originally posted by Gerardo
Im devolping my app using Visual Basic 6.0
Gerardo,
You would be better off posting in the General VB forum.
And, when you do - Which Sub (Cut, Copy, Paste) and Line do you get the error?
-
Aug 15th, 2003, 09:01 AM
#6
Hyperactive Member
Bruce
is there a better way to cut and paste?
-
Sep 1st, 2003, 12:44 PM
#7
PowerPoster
This is not a solution but.. in any case you should clear the clipboard before filling in data:
Code:
Clipboard.Clear
Clipboard.SetText blabla
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
|