Quote Originally Posted by ChrisW67 View Post
Qt Code:
  1. ui->excel->dynamicCall("CommandBars("MyToolbar").Enabled = true");
  2. ui->excel->dynamicCall("CommandBars("Worksheet Menu Bar").Enabled = true");
  3. ui->excel->dynamicCall("CommandBars("MyToolbar").Enabled = true");
  4. ui->excel->dynamicCall("CommandBars("Worksheet Menu Bar").Visible = true");
  5. ui->excel->dynamicCall("show.toolbar("Ribbon",True");
To copy to clipboard, switch view to plain text mode 


The first thing I would try is to correctly escape the double-quotes inside the argument to dynamicCall, e.g.
Qt Code:
  1. ui->excel->dynamicCall("CommandBars(\"MyToolbar\").Enabled = true");
To copy to clipboard, switch view to plain text mode 


I do not have the required environment to try any of this but have used ActiveX in Qt before. I have been able to use it more easily with a suitable type library. Maybe you should look at the ActiveQt tool dumpccp and the TYPELIBS qmake variable.
Hi, thanks for the reply. My actual code does have the correct escape characters but unfortunately this seems to have been lost when cut/pasting to the forum for some reason