[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Excel Spreadsheet



PureBytes Links

Trading Reference Links

I need help in creating a macro for Excel that interacts with another program
but I keep getting an error code for a run-time error '1004' at the same
point.  It states that "Paste method of worksheet class failed".  It refers to
ActiveSheet.paste in the following formula:

 Selection.Copy
    Application.CutCopyMode = False
    ActiveWindow.SmallScroll ToRight:=-1
    Range("B78").Select
  >>  ActiveSheet.Paste
    Range("A78").Select
    ActiveSheet.Paste
End Sub

The macro is simple, just copy and paste from Excel to another program, get
the result and copy and paste back to Excel.  My Help file for macro's is
missing so I am not certain of the ActiveSheet definition but it appears to be
a problem of switching between Excel and another Program (which is not a
Microsoft product).

I have tried switching using the mouse and the task bar (Win95) and with
keyboard strokes such as Alt-Tab and Alt-Esc but I get the same error code.
Any ideas on how to designate the ActiveSheet to Excel?  Thanks for any help.
Lynn