VBA macro help reflection workspace

manojxls

New Member
Joined
Dec 21, 2017
Messages
24
Office Version
  1. 365
  2. 2007
  3. 2003 or older
Platform
  1. Windows
Hi,

When I running below code works fine
ExcelApp.activesheet.range("b2").copy

But below code shows error as (object doest support this property or method)
ExcelApp.activesheet.range("j2").paste

Please help
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Ranges do not have a .Paste method, it is a method of a worksheet object.

Try

VBA Code:
With ExcelApp.ActiveSheet
    .Range("B2").Copy Destination:= .Range("J2")
End With
 
Upvote 0
Ranges do not have a .Paste method, it is a method of a worksheet object.

Try

VBA Code:
With ExcelApp.ActiveSheet
    .Range("B2").Copy Destination:= .Range("J2")
End With

Yes your code works good in copy from excel to excel.

But my problem not solved

I have code
ibmCurrentScreen.SetSelectionStartPos 8,62
ibmCurrentScreen.ExtendSelectionRect 8,70
ibmCurrentScreen.Copy

Above 3 line code works correct
But the copy number for not paste In cell j2

Want to paste number from IBM reflection terminal to excel.

Please suggest
 
Upvote 0
I don't know what an IBM reflection terminal is. The naming of the variable ibmCurrentScreen suggests that more than a number is being copied.
 
Upvote 0
I don't know what an IBM reflection terminal is. The naming of the variable ibmCurrentScreen suggests that more than a number is being copied.
From terminal 9 digits number is copied that i can see in clipboard that works correct

Any way I can copy from terminal to excel
 
Upvote 0
This will take text from the clipboard and put it in a cell
VBA Code:
Dim objDataobject As DataObject
    
objDataobject.GetFromClipboard
Range("A1").Value = objDataobject.GetText
 
Upvote 0
Showing error complier error
User defined type not defined
 
Upvote 0
Set a reference to Microsoft Forms Object Library.

Or add and then delete a userform, which will do the same thing.
 
Upvote 0
No code.

From the VBE, Tools > References, find and tick Microsoft Forms Object Library.
 
Upvote 0

Forum statistics

Threads
1,214,897
Messages
6,122,141
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top