Exporting Project data to an Excel spreadsheet.

J

JimS

I have a Project macro that actives the Excel application, exports data to a
spreadsheet and then performs modifications on the Excel spreadsheet. One
modification I want to make is to freeze the headings. However, when I
execute the following commands,

Workbooks(WWWorkbookName).Worksheets(WorkWeek).Activate
ActiveWindow.FreezePanes = True

Project flags an error "Object doesn't support this property or method". I
thought that the .Activate would make the window with the spreadsheet the
active window. Is there a correct way to make the spreadsheet window the
active window so I can freeze the header or is there a different way to do
this.

Thanks,
--Jim
 
J

Jan De Messemaeker

Hi,

Since activewindow is also a Project object, you will have to add the
reference to the application
Suppose your excel application object is called xlapp then
xlapp.activewindow
gives you excel's active window
HTH
 

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