Expand size of embedded excel window within word doc

N

NEA9886

I have embedded an excel table within a word document. I created a macro to
insert a row in the proper place. Is there a VBA line or lines that I can
add to automatically expand the size of the excel window by one row so I can
see the bottom line of the spreadsheet within the word document?


Private Sub CommandButton1_Click()
' Inserts Row in Credit Exposure Table
'
Application.Goto Reference:="Insertion_Point"
Selection.EntireRow.Insert
TableHeight = Application.Height + 16
' Is there a line or two I can add here t expand the size
' of the excel table in word so the bottom line of the worksheet
' does not drop out of sight?

End Sub
 
C

Cindy M.

Hi =?Utf-8?B?TkVBOTg4Ng==?=,
I have embedded an excel table within a word document. I created a macro to
insert a row in the proper place. Is there a VBA line or lines that I can
add to automatically expand the size of the excel window by one row so I can
see the bottom line of the spreadsheet within the word document?
No. Unfortunately there's no way to change that "window" into the Word document
programmatically.

The only work-around I've ever been able to find is to maintain the spreadsheet
in a workbook file. Make the change in the file, delete the current embedded
object and insert it again from the file. Word will automatically create the
"window" to display the "used range" in the worksheet.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top