fortypoundhead.com

jruss2630

Joined:
2015-11-11
09:23

Last Seen:
2015-11-16
04:16

Posted on:
2015-11-12
09:31

VB6 Windows 10 Office 2013 - Excel Hangs

Report Back to Forum Back to All Forums

Hello All. I've got VB6 pretty much working on windows 10 with Office 2013 Installed.
I've just got a problem with my apps creating excel spreadsheets. It just hangs with the application busy msgbox as soon as I add a workbook to the excel object.

It only happens if I run the application from within the IDE. If I compile my application and run the exe it works fine.  Any ideas??

 

Neither 'Switch to' or 'Retry' work. I have to kill Excel via the task manager.

'

 

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-10-20
07:03

Posted on:
2015-11-12
14:00

Report Back to Forum Back to All Forums

Is it possible that you are feeding Excel too quickly?  If you're pushing data to Excel inside of a loop, you might try putting a DoEvents in there to slow it down.

jruss2630

Joined:
2015-11-11
09:23

Last Seen:
2015-11-16
04:16

Posted on:
2015-11-13
04:59

Report Back to Forum Back to All Forums

Hello Dwirch. I don't get that far. It happens as soon as I try to set the workbook after I've created the excel instance It works fine if I run the compiled exe???

dwirch

Joined:
2005-01-01
08:24

Last Seen:
2017-10-20
07:03

Posted on:
2015-11-15
08:19

Report Back to Forum Back to All Forums

Is your IDE running in the context of Administrator?  I'm thinking that when you run your EXE, it is running as the currently logged in user.  Could it be that setting "Run As Administrator" in your shortcut is causing a permissions "problem" when trying to fire that action from the IDE?  

Maybe try unticking that "run as administrator" checkbox (if it is checked), and see if that works.  You shouldn't need it there any longer anyway, as the run as administrator is needed only during install and first run.  After that, you should be able to uncheck it.

jruss2630

Joined:
2015-11-11
09:23

Last Seen:
2015-11-16
04:16

Posted on:
2015-11-16
04:15

Report Back to Forum Back to All Forums

Hello Dwirch

Nice thought, but didn't help. However it got me thinking about the compatibility mode. I had it checked to run in XP sp3 mode. When I unchecked it, the problem disappeared! I tried it with XP sp2 as well and it didn't work either. I also tried running my exe file in compatibilty mode and it then developed the same problem. So as long as compatibilty mode is not enabled it works fine.

So it's all good for ongoing development, but I can see issues ahead if my users want to use compatibilty mode for any reason. I gather if it's not enabled it can seem a bit clunky.

Thanks for getting me on the right track.

You must be logged in order to post a reply.




Recent Forum Posts

Advanced search added
dwirch posted on September 23, 2017 at about 13:44 in Site News

Job Spammer: Gaurav Mehta - AgreeYa Solutions
dwirch posted on September 22, 2017 at about 10:35 in Spammers

Job Spammer: Prutha Siri - Javelin Systems
dwirch posted on September 10, 2017 at about 6:15 in Spammers

New security implemented
dwirch posted on September 7, 2017 at about 7:16 in Site News

Malicious IP Checker Companion Tool
dwirch posted on August 12, 2017 at about 20:24 in Site News

Job Spammer: Steve Adams
dwirch posted on August 8, 2017 at about 7:44 in Spammers