Web Development

General discussion


Excel.Application Menu Bar

By hophead3 ·
I'm creating an instance of an Excel application in VB.NET, and can't get the Menu Bar("File, Edit, View etc.) to appear.

Private mAppExcel As Excel.Application
mAppExcel = New Excel.Application
mWrkExcel = mAppExcel.Workbooks.Add
mWrkExcel.Application.WindowState = Excel.XlWindowState.xlNormal
mWrkExcel.Application.CommandBars("Worksheet Menu Bar").Enabled = True

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by rclark In reply to Excel.Application Menu Ba ...


You are going to have problems with this anyway. Excell doesn't play nice. From experience, it will work the first time, then you'll have to close .net to get it to work again. It has to do with the way MS fielded the application interface. You may have found a way around it. I never did. Finally put the spreadsheet portion into a module and called it when I needed to do the spreadsheet creation. That isn't a good solution, but it worked for what I needed. Good luck.

Related Discussions

Related Forums