ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   resizing Excel Window from VB.Net (https://www.excelbanter.com/excel-programming/357047-resizing-excel-window-vbulletin-net.html)

[email protected]

resizing Excel Window from VB.Net
 
Hello,

I just try to modify size and position of a Excel 2000 window from
VB.Net (Express 2005) :

AppExcel = New Excel.Application
Classeur = AppExcel.Workbooks.Open(ficName)
Feuille = Classeur.ActiveSheet
win = AppExcel.Windows(1)

I tried some stuff like :

win.Top = 20D
win.EnableResize = True
win.Application.Top = 20D
AppExcel.Top = 20D

But all those lines lead to the same error :
System.Runtime.InterOpServices.COMException

For win.top for example : (translated from french)
"Impossible to set Width property in Window class"
or :
"Exception from HRESULT: 0x800A03EC"

The properties are not readOnly and I can acces to cells without any
problem.

What is the problem ?
Thanx a lot.

Sergio.



All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com