<p>I'm launching OpenGL from a VBA module linked to an Excel spreadsheet which goes quasi-dormant (the quasi will become clear in a moment) once I enter glutMainLoop. I would like to be able to edit the Excel spreadsheet and observe corresponding changes in the OpenGL simulation. In this context,  I have two issues:</p>
<p>Issue 1 (as John McLaughlin used to bark on his PBS show!): Currently, <strong>once within glutMainLoop</strong>, I can only make changes to Excel cells that have pulldown menus, but not cells that require keyboard input. I believe that this issue may be related to the lack of a multi-threading ability either withing glut or VBA (this is WAY above my Mech E pay grade). I'd like to know however, if there's a workaround.</p>
<p>Issue 2: When I make changes to the Excel cells with pulldown menus, the OpenGL window gets minimised, unless I move it to a second screen or outside the Excel window which is not convenient. I understand that this is typical Windows behaviour, but at the very least, is there an openGL command to maximise it again after the changes to the Excel spreadsheet, <strong>from within glutMainLoop</strong>?</p>
<p>I'd like to emphasise that Issue 1 above - the lack of ability to edit Excel cells requiring keyboard input once within glutMainLoop - is far more important.</p>
<p>Thanks in advance. I've added an image below that (hopefully!) describes what I'm trying to accomplish.</p>
<p><a href="https://i.sstatic.net/IpzMc.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IpzMc.jpg" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2019-01-15T07:45:20.547Z
What happens in glutMainLoop? Is there any animation/rotation/etc. or is this all a static picture for a given set of inputs? Btw, the question's title totally hooked me! I can't believe people actually launch OpenGL within Excel!
bernie
CC BY-SA 3.0
2017-07-24T13:48:41.613Z
I think this question might do better on Stack Overflow than here, as your questions are very specific to using VBA in Excel and not much to do with graphics algorithms.
Dan Hulme
CC BY-SA 3.0
2017-07-24T13:51:07.137Z
Ah, I see you asked an earlier, less detailed version of the question there. You should probably edit *that* question to give as much detail as this one. But you should brace yourself for the possibility that Excel just can't do what you're asking.
Dan Hulme
CC BY-SA 3.0
2017-07-24T13:55:45.150Z
Yes, and in fact I've almost given up on a simple solution from within glut as I was hoping. The workarounds suggested all involve things like "VB script worker threads"  and the like that will take me on a gargantuan sidetrack from my key objectives, so very well, I suppose ...
Sharat V Chandrasekhar
<opengl>
Manipulating simulation within glutMainLoop from an Excel spreadsheet
Sharat V Chandrasekhar
# Manipulating simulation within glutMainLoop from an Excel spreadsheet

(Asked by: username_0 on 2017-07-24)

I'm launching OpenGL from a VBA module linked to an Excel spreadsheet which goes quasi-dormant (the quasi will become clear in a moment) once I enter glutMainLoop. I would like to be able to edit the Excel spreadsheet and observe corresponding changes in the OpenGL simulation. In this context, I have two issues:

Issue 1 (as John McLaughlin used to bark on his PBS show!): Currently, **once within glutMainLoop**, I can only make changes to Excel cells that have pulldown menus, but not cells that require keyboard input. I believe that this issue may be related to the lack of a multi-threading ability either withing glut or VBA (this is WAY above my Mech E pay grade). I'd like to know however, if there's a workaround.

Issue 2: When I make changes to the Excel cells with pulldown menus, the OpenGL window gets minimised, unless I move it to a second screen or outside the Excel window which is not convenient. I understand that this is typical Windows behaviour, but at the very least, is there an openGL command to maximise it again after the changes to the Excel spreadsheet, **from within glutMainLoop**?

I'd like to emphasise that Issue 1 above - the lack of ability to edit Excel cells requiring keyboard input once within glutMainLoop - is far more important.

Thanks in advance. I've added an image below that (hopefully!) describes what I'm trying to accomplish.

[![enter image description here](https://i.sstatic.net/IpzMc.jpg)](https://i.sstatic.net/IpzMc.jpg)

**Tags:** opengl

> **Comments:**
> **username_2**: I think this question might do better on Stack Overflow than here, as your questions are very specific to using VBA in Excel and not much to do with graphics algorithms.  
> **username_2**: Ah, I see you asked an earlier, less detailed version of the question there. You should probably edit *that* question to give as much detail as this one. But you should brace yourself for the possibility that Excel just can't do what you're asking.  
> **username_0**: Yes, and in fact I've almost given up on a simple solution from within glut as I was hoping. The workarounds suggested all involve things like "VB script worker threads"  and the like that will take me on a gargantuan sidetrack from my key objectives, so very well, I suppose ...  
> **username_1**: What happens in glutMainLoop? Is there any animation/rotation/etc. or is this all a static picture for a given set of inputs? Btw, the question's title totally hooked me! I can't believe people actually launch OpenGL within Excel!  

---

## 0 answers

