Open workbook-macros enabled, opening another with macros

  • Thread starter Thread starter George J
  • Start date Start date
G

George J

I have a nasty feeling that this is not possible, but...

I have a workbook that shows a splash screen if macros are
not enabled so that the user knows they need to enable
macros to get any further.

The problem i have is that a userform on this workbook
will open another workbook (in a new excel application
using shell "excel.exe"), that also has macros, but i
don't want the macro warning to be displayed. Is there any
way of doing this - because the user has agreed that they
want to run macros to access the original workbook??

I am using excel97 so can't use this
'----------------------------------------------------------
Application.AutomationSecurity =
msoAutomationSecurityForceDisable
'----------------------------------------------------------

The reason i ask is that many of the users are confused as
to what they should do when the message and options come
up. (management)

thanks
George
 
Use OLE automation to open the other instance of Excel and open the workbook
( don't believe this raises the prompt). But why not open it in the current
instance? I am sure you have a legitimate reason.
 
Hello George
I can think of two ways:
Either
change the user's security macro settings to Low
Or
Create a certficate with SELFCERT.EXE, attach it to your VBProject and Save
and then distribute your workbook.
In which case the next time your users will open the workbook, the message
will be slightly different (but still asking for activating macros) as it
will include a checkbox to tick to permanently allow macros with the given
certificate.
Once the checkbox will be ticked, next time macros will be automatically run
without any security prompt.

HTH
Cordially
Pascal
 
In excel 97, there are no levels of security (either on or off) and
certification is not supported.
 
oops sorry!
Did not notice the Excel 97 mention.
Apologies.
Cordially
Pascal
 
It probably all boils down to my poor coding and lack of
experience.

This is the first time i have used userforms and as my
workbook worked on its own, wanted to keep it working.
Will have a look at some of the code when i'm not
brainfried. I tried using OLE Automation (i think) in a
message you replied to yesterday but it wasn't running the
workbook.open command so that was why i went with
shell "excel.exe"

http://search.communities.microsoft.com/newsgroups/previewF
rame.asp?
ICP=prod_office&sLCID=US&sgroupURL=microsoft.public.excel.p
rogramming&sMessageID=%253C146201c49bed%24306c87f0%
(e-mail address removed)%253E

I was concerned that if the user already had documents
open i will not be able to get them to close them down and
serious screwups could result. That is why i am trying to
get it started in a new application.
But i think you are right and i should be able to
reference the wb the changes are to be made in. I think
right now i have if activeworkbook = a, use b.

Something stupid like that.

thanks for trying to help.
nothing a brain transplant can't cure ?:-)

George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top