Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Properties Stoney Currie[_2_] Excel Discussion (Misc queries) 1 April 30th 10 02:02 AM
Unable to click on charts & unable to create any new charts Excel Snapclick Charts and Charting in Excel 4 February 1st 09 07:59 PM
Excel Properties Harley New Users to Excel 2 January 19th 06 11:26 PM
Unable to see Properties in Design View for controls ts1 Excel Worksheet Functions 0 September 22nd 05 07:55 PM
Excel properties Kevin Excel Programming 7 August 7th 03 10:36 AM


All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"