Discussion Locked

Excel.Application Menu Bar

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

1 reply

by rclark2

VISIBLE=TRUE

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.

This discussion is closed to new replies.