ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   General Cut & Paste Issue (https://www.excelbanter.com/excel-programming/334980-general-cut-paste-issue.html)

lee

General Cut & Paste Issue
 
I have an application with multiple text boxes on a single worksheet and am
trying to allow the users to copy information from the worksheet (WK1) into a
text box (TB1) on the same worksheet, or open another file in the same
session of Excel and copy information from a worksheet (WK2) into the text
box (TB1) on the first worksheet (WK1).

I'm not sure what's happening. If I open up another file in the same
session of Excel, and switch between the workbooks in the same session, or
switch from the worksheet to the text box on the same worksheet, the paste
capability into the text box is shut off; however, I can copy from text box
to text box on the same worksheet If I open up another session of Excel, or
another application like Word, I can paste into the text boxes in the first
session.

Is there a settiing (or some code) that allows me to copy from the worksheet
to the text boxes on the same worksheet, or allows me to copy from one
worksheet to a text box in another workbook, within the same Excel session?
--
Lee

Roman[_4_]

General Cut & Paste Issue
 
Hi Lee,
what about to use a string variable to handle the text moving,
something like this:

Sub maketext()
Dim mytext As String
mytext = activesheet.Cells(1, 1).Value
ActiveSheet.Shapes("Text Box 1").TextFrame.Characters.Text = mytext
End Sub

("copy" text of A1 cell into text box called "Text Box 1" of active
sheet)



Lee napsal: I have an application with multiple text boxes on a
single worksheet and am
trying to allow the users to copy information from the worksheet (WK1) into a
text box (TB1) on the same worksheet, or open another file in the same
session of Excel and copy information from a worksheet (WK2) into the text
box (TB1) on the first worksheet (WK1).

I'm not sure what's happening. If I open up another file in the same
session of Excel, and switch between the workbooks in the same session, or
switch from the worksheet to the text box on the same worksheet, the paste
capability into the text box is shut off; however, I can copy from text box
to text box on the same worksheet If I open up another session of Excel, or
another application like Word, I can paste into the text boxes in the first
session.

Is there a settiing (or some code) that allows me to copy from the worksheet
to the text boxes on the same worksheet, or allows me to copy from one
worksheet to a text box in another workbook, within the same Excel session?
--
Lee




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com