id="info"

Question

Locked

VBA Excel Help

By rimap1 ·
I am having trouble selecting a cell using VBA code so I can paste data from another application/workbook. I think its a downfall of VBA-Excel because I have had this trouble before. Below is my code. Does anyone know how to get around it.

Set MyXL = GetObject("C:\Documents and Settings\rimap\Desktop\NIMO PI\plugNchugNIMO.xls")

' Show Microsoft Excel through its Application property. Then
' show the actual window containing the file using the Windows
' collection of the MyXL object reference.
MyXL.Application.Visible = True
MyXL.Parent.Windows(1).Visible = True
'Do manipulations of your file here.
MyXL.Activate
MyXL.Sheets("PIbatchPaste").Activate
MyXL.Sheets("PIBatchPaste").Cells.ClearContents

' this is where I have my trouble... it doesn't paste!
MyXL.ActiveSheet.Range("A1").Select
Selection.Paste


Thanks

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to Software Forum
3 total posts (Page 1 of 1)  

Software Forums