Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Cannot Paste into Textbox

I need a user to be able to copy the contents of a worksheet cell,
open a usrform and paste those contents into a textbox - I can't seem
to do it. The cell contents are copied OK (CTRL-C to the clipboard)
but when the textbox is selected and CTRL-V used, nothing happens. I
don't see any relevant properties for the textbox relating to this
functionality - can anyone help?

Thanks,
Al
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Cannot Paste into Textbox

I don't have any problem doing this but sometimes the clipboard is cleared
by Excel unexpectedly. I copied a cell and then ran a macro that did a
UserForm1.Show. The cell contents were pasted when I did a Ctrl-v (along
with unfortunately a carriage return character). So as long as the
clipboard isn't cleared by some action then the paste should work. (The
clipboard is not cleared as long as you see the "marching ants" around the
cell copied.)

--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Cannot Paste into Textbox

select the cell, go to the formula bar, highlight the data, do ctrl+c

select the textbox by clicking in the textbox, do Ctrl+v

this always works for me.

--
Regards,
Tom Ogilvy

"Al" wrote in message
om...
I need a user to be able to copy the contents of a worksheet cell,
open a usrform and paste those contents into a textbox - I can't seem
to do it. The cell contents are copied OK (CTRL-C to the clipboard)
but when the textbox is selected and CTRL-V used, nothing happens. I
don't see any relevant properties for the textbox relating to this
functionality - can anyone help?

Thanks,
Al



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Cannot Paste into Textbox

From your description, this may be more what you're after. I could be
wrong, after all this is my first time posting to a newsgroup. Here
goes (you'll obviously have to change the Userform & Textbox names, if
they are other than "Userform1" & "Textbox1":

Sub FormShow()
Dim CHOSENCELL As String
CHOSENCELL = ActiveCell.Value
UserForm1.TextBox1.Value = CHOSENCELL
UserForm1.Show
End Sub


Or if you're pasting from another applicaton. There's a command called
"GetFromClipboard" which you could look up in the Excel help files.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate Textbox value based on another textbox value.doc Tdungate Excel Discussion (Misc queries) 1 February 12th 09 07:11 PM
Calculate Textbox value based on another textbox value Tdungate Excel Discussion (Misc queries) 0 February 12th 09 07:03 PM
TextBox grahammal Excel Discussion (Misc queries) 1 April 10th 06 05:41 PM
Textbox disappears from Excel paste into PowerPoint NickSteel Charts and Charting in Excel 0 December 6th 05 05:17 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"