Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying in Extra, Pasting in Excel 1

Status
Not open for further replies.

blckngldhwk

Technical User
Feb 14, 2008
46
US
For whatever reason I'm having a block and can't figure out how to paste information that I have copied from Extra into a cell in Excel. Keep in mind, I'm not able to do this as a string, I am using the MyArea.Copy function and need to paste that into Excel.

Code:
Set MyArea = MyScreen.Area(18,02,21,80)
        
        MyArea.Select
        MyArea.Copy

        
        
        file = "H:\Macro Team\M201 Project\testbook1.xlsx"
 
        Dim obj as object
        Dim objWorkbook as object
        Set obj = CreateObject("Excel.Application")
        obj.visible = True
        obj.workbooks.open file
        set objworkbook = obj.worksheets("Sheet2")
        
        With obj.worksheets("Sheet2")
        
        .Cells(1,"B").activate

What's next?
 


Code:
   .Paste
End With

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
blckngldhwk,

Code:
.cells(1,"B") = MyArea

you don't need this either
Code:
MyArea.Select
MyArea.Copy

hth,
zach
 
Thanks vzach but that doesn't maintain the formatting I need to carry over from Extra, for whatever reason.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top