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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Command Bar Does Not Display

Status
Not open for further replies.

mamartin

Programmer
Aug 10, 2001
75
0
0
US
I am creating a VB6.0 application that selects some data and then writes it to an Excel 2000 file. When I call up Excel from within the VB app, the Standard and Formatting command bars do not display. This is what the code looks like:

Dim xlApplicationObject As Excel.Application
Dim xlWorkBookObject As Excel.Workbook
Dim xlWorkSheetObject As Excel.Worksheet

Set xlApplicationObject = CreateObject("Excel.Application")
Set xlWorkBookObject = xlApplicationObject.Workbooks.Add
Set xlWorkSheetObject = xlWorkBookObject.ActiveSheet

xlApplicationObject.CommandBars("standard").Enabled = True
xlApplicationObject.CommandBars("formatting").Enabled = True
xlApplicationObject.CommandBars("Standard").Visible = True
xlApplicationObject.CommandBars("Formatting").Visible = True

When Excel is invoked, it comes up, data is written to the proper cells, but no bars. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top