You will not able to... because macros have been enabled yet.
If you can't sign it and macro security is not set to low, then you will be
able to open and run code in your workbook.
That's why there is security; to prevent unwanted code from running.
And as far as Excel see it, your code is not authourised by the user.
NickHK
"Sankar" <(E-Mail Removed)> wrote in message
news

3C8C3F0-4CDC-428C-8BA6-(E-Mail Removed)...
> Thanks Nick. Our environment does not allow the certificate to be created
> even self :-). Probably I should try using some other commands to do enter
> tab on the "Enable" Macros button.
> Sankar
>
>
> "NickHK" wrote:
>
> > You can sign your VBA code (maybe with a certificate made with Office's
> > SelfCert.exe) and your users would then have trust it.
> > After that your code can run without that dialog.
> >
> > Otherwise, you cannot change a user's Security setting in code,
thankfully.
> >
> > NickHK
> >
> > "Sankar" <(E-Mail Removed)> wrote in message
> > news:E4BB83D6-E9F0-4885-88FF-(E-Mail Removed)...
> > > Hi,
> > > I have an excel workbook with a macro. My requirement is to schedule
to
> > run
> > > the macro in this workbook. I am using a batch command to open the
excel
> > book
> > > and would be scheduled in the windows scheduled tasks.
> > >
> > > When this excel sheet is opened it pops up the message to "disable" or
> > > "enable" macros. Is there a way that I can automatically run the macro
> > > without this message. I would not be able to change the security level
of
> > > macro to "Low" which is the commond option suggested by Microsoft and
else
> > > where.
> > >
> > > Your inputs will be appreciated and greatly helpful.
> > >
> > > Thanks,
> > > Sankar
> >
> >
> >