Jump to content

Excel title bar


Recommended Posts

Posted

Hi anyone,

I need to prevent a user to close an Excel session by clicking on the X symbol in the right top or in other ways from inside Excel. The reason to do this is because the Excel session is opened by LabVIEW and I need to close it by LabVIEW; on the contrary (clicking on the X symbol of Excel) it's impossible to open an Excel session from LabVIEW again (the refnum is not cancelled by the same application). I think the better thing is to hide the Excel title bar in some ways but I can't find out the right way. Is there someone who can help me?

Thank you

Posted

Their are several options I can think off, all are difficult.

For one it is possible to have an activex container with an excel worksheet.

Or more advanced, create a callback VI for the 'application close event', and then display a message to the user.

Ton

Posted

I don't know if you can manipulate the Excel window like that from another program (you should check out the MSDN for the window functions. You should also check out the winutil32 library from the NI site), but have you considered embedding the spreadsheet in your front panel using an ActiveX container?

Posted

Tank you,

I think It's a good idea to include an Excel sheet into a VI using an activeX container but I didn't find out the way to do that and any kind of example. Can you help me?

Tank you.

Posted

I don't have any experience with it.

Simply embed an Excel object in an ActiveX container (it should be called "Microsoft Office Spreadsheet" or something similar) and look at the properties and methods it has. I know that the Office class hierarchy can be confusing, but it should be documented in the help for Office.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.