PDA

View Full Version : Sleeper: Launching xls via shortcut duplicates macro prompt



jeeves
05-25-2005, 07:33 AM
Hey everyone - wondering if you can shed some light on this matter for me.

A fellow tech in the accounting department wants to make a spreadsheet available company-wide via a shortcut in a program. She had to work with the support for that company's program to get it to run.

The shortcut is as follows:
"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" "Y:\Toronto.xls"

The Y drive is a mapped drive standard for everyone. If the shortcut is only "Y:\Toronto.xls" then an error results and the spreadsheet is not opened.

The issue is this:
When launching the spreadsheet, the macro warning shows up twice. It appears to be once when Excel first launches, and then again when the spreadsheet is opened. I'm wondering if maybe this is caused by the COM add-ins we have integrated with Excel. I can't find a switch to load Excel without add-ins - /S for safe mode doesn't do the trick... at all.

The macros need to be enabled in the spreadsheet, and only one macro security warning is acceptable.

Does anyone know of a switch I could add to the shortcut so it opens Excel without loading other add ins?

Does anyone have any ideas as to what could be causing the double macro security prompt?

thanks so much! any ideas are welcome!

Anne Troy
05-25-2005, 08:06 AM
My opinion may differ from others...
Excel macro viruses are very unpopular these days. When's the last time anyone has seen one?
Why not just let everybody set their security to low?

Ken Puls
05-25-2005, 08:22 AM
Hi Jeeves,

Why do yo need to load Excel and the file in the shortcut path? In my test, that launched an instance of Excel, and then launched another with the actual file as well. That would explain the double prompt, I think.

Try making the shortcut just "Y:\Toronto.xls" and see if that helps. If you extensions are all registered correctly (.xls is associated with Excel) I think it shoudl work just fine.

HTH,

Anne Troy
05-25-2005, 08:23 AM
If the shortcut is only "Y:\Toronto.xls" then an error results and the spreadsheet is not opened.

Ken: RTFQ
LOL

Anne Troy
05-25-2005, 08:24 AM
OIC what you're saying...

Ken Puls
05-25-2005, 08:51 AM
Ken: RTFQ
LOL

:blush


If the shortcut is only "Y:\Toronto.xls" then an error results and the spreadsheet is not opened.

What is the error? I tried setting up a desktop shortcut using my J: drive (Novell mapped network drive). Shortcut was just "J:\Stat00.xls" in my test.

Worked peachy with no error. Could it be a drive/path issue at all?

jeeves
05-25-2005, 09:16 AM
:blush



What is the error? I tried setting up a desktop shortcut using my J: drive (Novell mapped network drive). Shortcut was just "J:\Stat00.xls" in my test.

Worked peachy with no error. Could it be a drive/path issue at all?

the support for the specific program advised the tech that the shortcut needs to be set up to identify the executable to launch the file with. (d'oh! :dunno)

So Y:\toronto.xls doesn't work and it isn't my concern why it doesn't, just to fix the shortcut so it either
a) launches in an unintegrated version of excel
or
b) doesn't show the macro security prompt twice.


ps - i'd love to have the macro security set from low to medium, but that just isn't feasible since it's a company standard .... darn once again...:(

Ken Puls
05-25-2005, 09:22 AM
Hmmm...

Well you got me there. The way that shortcut is set up, it definately launches 2 Excel instances for me. I get a host of issues around my Personal.xls being opened read only, multiple security messages, etc... IMHO, that's not the route to solving it, but maybe they have something special with their program. :dunno

How about another approach... can you assing a digital certificate to the Toronto.xls file? See Malcolm's article here (http://www.vbaexpress.com/forum/articles.php?action=viewarticle&artid=3) on using selfcert to do this.

HTH,

jeeves
05-25-2005, 09:38 AM
Hmmm...

Well you got me there. The way that shortcut is set up, it definately launches 2 Excel instances for me. I get a host of issues around my Personal.xls being opened read only, multiple security messages, etc... IMHO, that's not the route to solving it, but maybe they have something special with their program. :dunno

How about another approach... can you assing a digital certificate to the Toronto.xls file? See Malcolm's article here (http://www.vbaexpress.com/forum/articles.php?action=viewarticle&artid=3) on using selfcert to do this.

HTH,

aha! that just may be the solution! i'll give that a try and report back! :)

Ken Puls
05-31-2005, 09:19 AM
Hey Jeeves!

Did you get this to work? Just an FYI, in Mr Excel's free book preview, Excel startup switches was this week's topic. He does use the command line you started with, but with a slight difference:

"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" Y:\Toronto.xls

(No quotes on the last file)

I haven't tried this, but figured I'd throw it out to you in case you're still fighting this one.

Cheers,

jeeves
05-31-2005, 09:38 AM
Hey Jeeves!

Did you get this to work? Just an FYI, in Mr Excel's free book preview, Excel startup switches was this week's topic. He does use the command line you started with, but with a slight difference:

"C:\Program Files\Microsoft Office\Office10\EXCEL.EXE" Y:\Toronto.xls

(No quotes on the last file)

I haven't tried this, but figured I'd throw it out to you in case you're still fighting this one.

Cheers,

Thanks so much! I actually just logged on to provide an update. I looked into setting up a certificate, which is a great idea except that it only works on the computer it's been generated on.

I appreciate your checking back on me with the info re excel switches. I'll give that a try and see how the program likes it...

Ken Puls
05-31-2005, 09:43 AM
I looked into setting up a certificate, which is a great idea except that it only works on the computer it's been generated on.

Actually, that's not strictly true. Your certificate is generated on one machine, and can only be applied from that machine to the file. Once it's on there, though, it's on there. When you send it to another machine, you can add that certificate to their store so that it is trusted. It's convoluted, but it does work.

I actually use that very method here. I create my certificate, apply it, and send it out to about 7 different PC's, each of which I've installed the certificate to. The only issue is that if I debug on someone else's PC, I have to send it back to mine to reapply the certificate.

Cheers,