Forum Home
Press F1
 
Thread ID: 27431 2002-11-22 09:38:00 Word XP Macro Greg (193) Press F1
Post ID Timestamp Content User
100609 2002-11-22 09:38:00 Trying to run a macro in Word whereby you move the cursor from the Word Doc to an embedded excel worksheet and then open the worksheet to edit - but can't get a keyboard command to move to the worksheet.
Any ideas? Cheers
Greg (193)
100610 2002-11-22 19:35:00 Greg,

How about using Alt + Tab?
Oxie (1318)
100611 2002-11-22 21:58:00 No luck Oxie - that just moves between open applications.
Thanks though
Greg (193)
100612 2002-11-23 20:59:00 Hi Greg, I see what you mean. When running the record macro you cant actually select the worksheet object. However I think I found the answer for you in VBA help. Try this...

Sub ExcelObject()
ActiveDocument.InlineShapes(1).Activate

End Sub

The number in brackets after InlineShapes seems to indicate the object name in reference to where it sits within the Word doc. So for example you had three embedded worksheets in the same Word doc then the third one down in the document would be referenced by ActiveDocument.InlineShapes(3).Activate

cheers
Parry
parry (27)
100613 2002-11-25 23:59:00 You've done it again Parry :)
Cheers
Greg (193)
1