When activating a workbook that has macros, excel automatically displays an alert asking if the user wants to enable or disable macros.
Is it possible write code in excel to automatically pick "enable macros".
When activating a workbook that has macros, excel automatically displays an alert asking if the user wants to enable or disable macros.
Is it possible write code in excel to automatically pick "enable macros".
This is a security feature of Excel and it would not be advisable to do it if it is possible. There is an abundance of writing on this subject on other forums. I believe there is an example on Dave Hawley's site showing how to ensure a workbook is only usable if macros are enabled. All worksheets are XLvery hidden except a warning page advising the user to reopen the workbook with macros enabled
Very sorry guys, but I have deleted these replies. The offering of help to bypass Excel's macro security is not allowed on this site. Any code used to force macros to become enabled is classified as a virus.
Dave,
classified by whom ?
(there's no smily for "this is an honest question rather than a have-a-go-at-being-confrontational question" so I'll write it longhand !)
ta,
Chris
David:
Thanks for deleting the post about hacking into excel. I'm glad to see you prohibit such material on your site ... Thanks So Much.
Hi C D,
I support Daves action here to 101%
It´s not illegal to inform about it but by distributing information other user can make illegal actions, i e create & distribute XL-virus.
In this respect I will at least say that following parts classify the information as unwanted:
- Microsoft Corporation
- Anti-Virus software companies
- Most of the companies who's using MS
Excel in business-activities.
- OzGrid
- XL-Dennis
- C D?
Hi Dennis,
You *can* call me Chris
yes, I agree.... I just wondered if it was an industry classification, or a programmers' classification.... or maybe just a microsoft thing - or if it was actually classified in law, or international law or something........ I'm always curious to learn new things
:bsmile:
Chris
Hi Chris
RE: classified by whom ?
Classified by me.
Hi Guys,
Sorry for starting this up. I was not aware of the seriousness of this issue.
All I wanted to was to make the user display a particular dialog box and not let the user bypass this step. I thought one way of doing this would be to force the user to enable macros.
Again thank you for pointing out the dangers of doing this. I might have had to spend $$$$$$ in lagals if I had gone through with it.
I was looking for an Icon symbolising the action of kicking my self, could not find one.
Private Sub Auto_Open()
'Range "DateCheck" is a named cell on XlVeryHiden Sheet.
If Range("ExpDate") <= Range("SentDate") + 30 Then
PWord.Show
Else 'Set first open date
MsgBox ("Your password expires on " & Range("SentDate") + 30)
End If
End Sub
Don’t have an account yet? Register yourself now and be a part of our community!