Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Put Info from Clipboard to Textbox on form


textbox must have multiline=true
and following uses a JOIN to concatenate the cell contants...
so you'll need xl2k or newer.


LOAD frm3

'in the calling macro BUT preferably in the form's initialize event)
frm3.txtPartsPrediction.Value = _
Join( Range(Cells(1,1), Cells(Rows.Count, 1).End(xlUp).Offset(0,
4)),vblf)

frm3.show

if the form is modal any code after the SHOW will only be executed
AFTER the form is closed.


but my real tip: buy a book and do some studying.
Excel you can (sort of) learn by trial and error,
VBA needs understanding of fundamentals.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Stan wrote :

Hi All,

I'm trying to transfer some information (that was on a sheet) to a
textbox on a form. I am however having a lot of trouble with this.

I have tried a few things including the send keys approach, and
GetFromClipboard. The code below is what I've got so far, however
and although it doesn't crash, no text appears in the textbox. (If
however I click in the textbox and click 'Ctrl+V' it works - for some
reason?!?!?)

Any suggestions?
All help is greatly appreciated!



Workbooks("Testing Ground.XLS").Sheets("Paste").Select
Cells.Select
Selection.ClearContents
Range("A1").Select
ActiveSheet.Paste

Range("B10:B11,B18").Select
Selection.Delete Shift:=xlToLeft

Range("A1").Activate
Set d = Range(ActiveCell, Cells(Rows.Count, 1).End(xlUp).Offset(0, 4))

d.Select
Selection.Copy

frm3.Show


Dim objData As New DataObject
objData.GetFromClipboard
frm3.txtPartsPrediction.Value = objData.GetText


Thanks
Stan


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
Large amount of info on the clipboard ledzepe Excel Discussion (Misc queries) 2 March 1st 06 11:15 PM
Excel - give users option to keep info in clipboard after pasting Philipm Excel Discussion (Misc queries) 0 October 11th 05 06:29 PM
Getting info from the clipboard DredanZyl[_4_] Excel Programming 1 June 11th 04 11:07 AM
textbox on form Glenn Robertson Excel Programming 1 March 4th 04 11:29 AM
clipboard info Lee S.[_3_] Excel Programming 2 September 13th 03 12:04 AM


All times are GMT +1. The time now is 05:37 AM.

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"