Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unable to set Properties in Excel
Hi Ank,
You may want to try setting WindowState to -4143. That is the value of the xlNormal constant, which is what the WindowState function is expecting. Use -4137 for xlMaximized. Also, you'll want to change xlApp to wApp when you uncomment the commented lines of code. -- Regards, Jake Marx MS MVP - Excel Ank wrote: Hi, I am unable to set height, width, top or left property of Excel application. I am trying to create an excel application, open a spreadsheet and resize the excel application but resize doesn't seem to work. The same properties work when creating word application. the error that i get is "Unable to set XXX property of the application class" of error # 1004. I have looked all over the places without success. Please help! Here's the snippet of the code: Set wApp = CreateObject("Excel.Application") '*Set it to normal wApp.WindowState = 3 '*Resets the viewing properties of the word window. wApp.Top = 0 ' xlApp.Left = 0 ' xlApp.Width = screen.Width ' xlApp.Height = 200 'Open the document now wApp.Application.Workbooks.Open strDocName wApp.ActiveWindow.WindowState = 2 wApp.Visible = True thanks, Ank |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel Properties | Excel Discussion (Misc queries) | |||
Unable to click on charts & unable to create any new charts Excel | Charts and Charting in Excel | |||
Excel Properties | New Users to Excel | |||
Unable to see Properties in Design View for controls | Excel Worksheet Functions | |||
Excel properties | Excel Programming |