M
mike
I'm trying to do a simple paste into an embedded excel object. I need to
select the cell I want to paste into, but I can't seem to do that. The paste
works... but it pastes into whatever the last selected cell was, which is not
acceptable. This is my code:
Sub PasteIntoExcel()
Dim xlSheet As Excel.Worksheet
Set xlSheet = ActivePage.Shapes("excel").Object.Worksheets(1)
'This next line gives me an error "Activate method of range class failed."
'xlSheet.Range("E2").Activate
'This next line gives me an error "Select method of range class failed."
'xlSheet.Range("E2").Select
xlSheet.Paste
End Sub
select the cell I want to paste into, but I can't seem to do that. The paste
works... but it pastes into whatever the last selected cell was, which is not
acceptable. This is my code:
Sub PasteIntoExcel()
Dim xlSheet As Excel.Worksheet
Set xlSheet = ActivePage.Shapes("excel").Object.Worksheets(1)
'This next line gives me an error "Activate method of range class failed."
'xlSheet.Range("E2").Activate
'This next line gives me an error "Select method of range class failed."
'xlSheet.Range("E2").Select
xlSheet.Paste
End Sub