1 registered members (PaulL),
105
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums69
Topics113,609
Posts1,341,221
Members1,802
|
Most Online731 Jan 14th, 2020
|
|
|
How to stop Excel opening VBcode window on macro?
#1565684
07/03/2016 12:31
07/03/2016 12:31
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
Heeeeellllllllpp!
I'm sure my macros didn't used to do this but now when I run a macro that I use regularly, Excel opens up the code window as well. This was helpful while I was writing and debugging the code but now that everything runs as I'd like it has become rather irritating. My macro would also be useful for a few other people in the office whom I'm sure would just want to be able to run the macro whilst having no interest whatsoever in reading my shonky VBA every time they run it.
Google is failing me on this. Have I missed an obvious tick box somewhere?
Last edited by Wishy; 07/03/2016 12:52.
Up yours Photobucket.
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: Wishy]
#1565688
07/03/2016 14:07
07/03/2016 14:07
|
Joined: Dec 2005
Posts: 8,416 Lightwater, Surrey
DaveG
Club Treasurer Member 311
|
Club Treasurer Member 311
Je suis un Coupé
Joined: Dec 2005
Posts: 8,416
Lightwater, Surrey
|
Is it anything like this?
1996 Portofino 20vt & 2000 Pearl White Plus 1985½ & 2016 2017 Fiat 124 Spider + XF Sportbrake
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: DaveG]
#1565691
07/03/2016 16:40
07/03/2016 16:40
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
Unfortunately not, that thread title had me all excited but alas it doesn't matter whether my code window is maximised or not when I run the macro. I get the code window opening either way.
Up yours Photobucket.
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: Wishy]
#1565692
07/03/2016 16:57
07/03/2016 16:57
|
Joined: Dec 2005
Posts: 8,416 Lightwater, Surrey
DaveG
Club Treasurer Member 311
|
Club Treasurer Member 311
Je suis un Coupé
Joined: Dec 2005
Posts: 8,416
Lightwater, Surrey
|
Which version of Excel? You don't have any personal macros set up to run do you? Have you tried hiding the offending Modules? Security settings?
I wonder if you can delete any default/profile settings and get Excel to recreate them?
You haven't just upgraded Excel or Windows have you? Or installed any updates?
1996 Portofino 20vt & 2000 Pearl White Plus 1985½ & 2016 2017 Fiat 124 Spider + XF Sportbrake
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: DaveG]
#1565718
07/03/2016 21:52
07/03/2016 21:52
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
It affects both Excel 2010 and 2013 on both my home machine (just upgraded from Windows 7 to 10 but the issue has existed both before and after the upgrade) and my work one (Windows 7). I can check Excel 2016 later.
What do you mean by personal macros? I wrote the code if that's what you mean. There is one module containing two macros.
Not sure how to hide the module, if I right click in the code window and hide it, all it seems to achieve is to hide the project explorer.
Security settings are the default, no password protection. Putting a password on viewing the code just succeeds in making it read only but still opens the window.
On the plus side I've just learnt how to use Windows 10's new screen video capture utility although it doesn't show anything useful in this case as it only shows the main Excel window but not the code one opening.
Haven't tried playing with any profile settings on this machine as I'm using it to work from home for the next 3 days so am a tad reticent to do that.
Last edited by Wishy; 07/03/2016 21:53.
Up yours Photobucket.
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: Wishy]
#1565728
07/03/2016 23:00
07/03/2016 23:00
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
Same issue on Windows 10/Excel 2016.
Up yours Photobucket.
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: SimonN]
#1565791
08/03/2016 20:34
08/03/2016 20:34
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
There's no such thing as a silly question until I've sorted this. I had been launching them without the developer options visible, I use view -> macros -> view macros -> run. However, I did make them visible yesterday to try some of the suggestions but it doesn't make a difference. I run dual screen at home and work but the Excel 2016 machine I tested yesterday was a laptop with just one screen. No difference. One thing that I have just tried is writing another macro and that runs happily without opening the code window so I'm starting to think it's something in the macro itself. I might try cutting it down bit by bit to see if that changes anything.
Last edited by Wishy; 08/03/2016 20:35.
Up yours Photobucket.
|
|
|
Re: How to stop Excel opening VBcode window on macro?
[Re: SimonN]
#1565800
08/03/2016 21:55
08/03/2016 21:55
|
Joined: Jan 2006
Posts: 5,988 Sunny Darlo
Wishy
OP
Forum is my life
|
OP
Forum is my life
Joined: Jan 2006
Posts: 5,988
Sunny Darlo
|
Food for thought thanks. I'm guessing the opposite of that command might force Excel to do what I'd like.
I will have recorded keystrokes as part of the writing process. As I don't tend to write macros very regularly my working practice is generally as below...
Start to record a macro, Do some stuff with keyboard and mouse roughly related to something I'm trying to achieve Save as a macro Write loops and ifs etc around the resulting macro code.
If I come to something that I don't know the command for then I'll generally repeat the record process and copy and paste the resulting code into the main macro that I'm writing.
So yes, there will be keystrokes recorded all over the place.
Up yours Photobucket.
|
|
|
|