Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Some Excel functions unavailable after VB.NET program exports

Status
Not open for further replies.

tcsbiz

Programmer
Dec 18, 2002
541
US
Hi everyone,

This has me baffled. I searched here and on the internet for this.

I have a VB.NET 2008 program that creates and exports data to two tabs of an Excel spreadsheet. The first tab has certain menu items grey-out indicating they are unavailable. The second tab does not have that problem. When you click on the second tab, it has all menu items available and when you click back on the first tab, it has all of the menu items available.

The spreadsheet is created as 97-2003 compatible but being opened in Excel 2007. I haven't tried creating it as a 2007 document. We are doing this as a compatible document because not all users have Office 2007, yet.

It's not a huge deal but does anyone know what could be causing this?

Thanks.
 
I think I've got this figured out. I commented out the following line of code and it works fine. I don't know why that would cause a problem.

Code:
objExcel.Worksheets.Select(1)

[wiggle][wiggle][wiggle][wiggle][wiggle][wiggle]


 
I've never had the problem you did, but I have had where .Select on various objects can suddenly cause a problem since 2007.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Thanks Sorwen. I still surmise that it may have to do with compatability.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top