Running this code:Results in this Excel window:Please Login or Register to view this content.
excel.png
And the 'Customize Ribbon'/'Quick Access Toolbar' are deactivated in the 'Excel Options' window:
ribbon.png
Running this code:Results in this Excel window:Please Login or Register to view this content.
excel.png
And the 'Customize Ribbon'/'Quick Access Toolbar' are deactivated in the 'Excel Options' window:
ribbon.png
Are you able to click the ribbon options at all?
There's nothing to click besides Minimize, Restore and Close:
Attachment 866606
Does pressing Ctrl+Shift+F1 have any effect?
No! Do you not get the same result when running the code?
No I don't get that.
Is the ribbon there if you just create the instance, before adding the workbook?
Also, Not sure if this is necessary as a new instance won't have any workbooks.Please Login or Register to view this content.
Please Login or Register to view this content.
The application closes before I can see.Is the ribbon there if you just create the instance, before adding the workbook?
On my machine the New Application object often contain other open workbooks.
I don't think the new instance should have any workbooks and usually you have to specifically make the instance visible.
You could try late binding.
Are you making use of the personal workbook? If so you could try not doing so and see if that resolves it.Please Login or Register to view this content.
Running the code in an existing workbook, usually results in the 'New Excel.Application'/'CreateObject("Excel.Application")' object containing the workbook first time around, get new instances thereafter.
Including '.Visible = True' results in the Ribbon/Menu bar/Quick Access Toolbar showing.
I don't get a new workbook when creating a new instance and I don't think you should unless it's loading something in the Start folder or personal workbook. For me it's also invisible by default.
At least the ribbon is back though?
On my machine running this exact code:results in no Ribbon/Menu bar/Quick Access Toolbar showing, the question is, why is that.Please Login or Register to view this content.
Do you get a new workbook if you run code that includes:?Please Login or Register to view this content.
No the ribbon is not back, includingis not this exact codePlease Login or Register to view this content.
Please Login or Register to view this content.
I do, but the ribbon etc is there.Do you get a new workbook if you run code that includes:
Copy to clipboard
Application.Workbooks.Add
If it run Set objApplication = New Excel.Application I get new instance which is hidden by default and contains no workbooks but has the ribbon.
I asked why this exact code:results in no Ribbon/Menu bar/Quick Access Toolbar showing.Please Login or Register to view this content.
You write:I didn't ask if one gets a new workbook when creating a new appplication object. I didn't ask if a new application object is invisible by default or not.I don't get a new workbook when creating a new instance and I don't think you should unless it's loading something in the Start folder or personal workbook. For me it's also invisible by default.
Maybe not, but it's relevant. If you use:
it should fix your issue.Please Login or Register to view this content.
Remember what the dormouse said
Feed your head
I can't replicate your issue with the ribbon or the need to retry to create a new instance without a workbook and was hopeful that your remark in post #9 concerning the visible property was indicative of some progress. I'm sorry that doesn't seem to be the case and that I don't have anything else to suggest.
I'll reference this thread in the Cavalry section: Maybe someone else will have more success.
I just wonder why the Ribbon/Menu bar/Quick Access Toolbar doesn't show when I run this exact code:There is no issue that needs fixing, I just wonder why that exact code does what it does.Please Login or Register to view this content.
I would say it's a bug. The application shouldn't be visible at all with that code, but making the window maximised seems to force it to appear, but not properly loaded. It may be that that is how it naturally works behind the scenes when it is invisible; after all, why bother with the overhead of loading the ribbon/qat etc if they can't be seen or used?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks