no macro warning!

Todd_M

Board Regular
Joined
Feb 24, 2002
Messages
117
Hi
How do you stop the macro warning msgbox showing everytime Im about open a workbook containing macros?
 
Russel- You dont have to register it from on line, and im not sure of the question your asking. This signature only works for that workbook. If I try to open another workbook that does not have my signiture I will be promped for a macro. I think thats what your saying??
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I'm just saying that from what was explained, it sounds like anybody can create a "digital signature". So a somebody that wanted to spread a virus could therefore digitally sign the workbook so it wouldn't ask about macros. Not that I open workbooks from just anyone, but still - sounds scary to me how easy and annonymous it seems to be.
 
Upvote 0
Russell, I believe the digital signature has to be registered on the clients computer.

Sort of like when you download stuff from the internet, usually there's a checkbox on the download form that says something like : "Always Trust Software from 'Insert Company Name'".

Personally I don't believe you should use anything that disables macro protection, even from a trusted source.

I also put in a "semi-disclaimer" by saying that I've never used it. :)
_________________<font color = green> Mark O'Brien
This message was edited by Mark O'Brien on 2002-03-12 18:22
 
Upvote 0
Mark- If you create a number of forms, spreadsheets and macros in a nice little package with lots of flare, give it to the user to use everday, The most anoying thing would be to have that macro protection promp pop up each time you open it!
 
Upvote 0
Todd,

Yup, understood, that's why I suggested digital signatures.

I don't use them because it's not too much of a hassle for me to click "enable macros" once at startup. It's become automatic for me to do this.

Which is kind of funny because 99 times out of 100 the workbook with macros in it is mine.

Anyway, I hope you've got your answer somewhere in this thread. :)
 
Upvote 0
That anonymous post was me BTW. Got timed out again.

(selecting "Keep Me Logged in", doesn't work for me)
 
Upvote 0
I can't take the credit for this but thought I would share. It does work but as mentioned previously use with caution in your programs.

' The following code demostrates how to turn on/off Excel's macro virus protection for both Excel 97 and 2000.

Option Compare Text
Option Explicit

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal lhKey As Long) As Long
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal lhKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal lhKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Const REG_HEX As Long = 4 'Hex Key
Private Const HKEY_CURRENT_USER As Long = &H80000001


'Purpose : Enables or disables the macro virus alert by altering the security level in the registry.
'Inputs : lSecurityLevel 1, sets security to "Low" (disable virus alerts)
' 2, sets security to "Medium"
' 3, sets security to "High"
'Outputs : Returns True on success
'Author : Andrew Baker
'Notes : Requires Excel 2000

Function MacroSecurity2000(lSecurityLevel As Long) As Boolean
Dim sData As String, lRet As Long
Const csPath = "SoftwareMicrosoftOffice9.0ExcelSecurity", csValue = "Level"

If lSecurityLevel <= 3 And lSecurityLevel > 0 Then
On Error GoTo ErrFailed
RegCreateKey HKEY_CURRENT_USER, csPath, lRet
RegSetValueEx lRet, csValue, 0, REG_HEX, lSecurityLevel, 4
RegCloseKey lRet
MacroSecurity2000 = True
End If

Exit Function
ErrFailed:
MacroSecurity2000 = False
End Function


'Purpose : Enables or disables the macro virus alert.
'Inputs : bDisableVirusChecking True, disables macro security protection
' False, enables macro security protection
'Outputs : Returns True on success
'Author : Andrew Baker
'Notes : Requires Excel 97

Function MacroSecurity97(bDisableVirusChecking As Boolean) As Boolean
Dim lData As Long, lRet As Long
Const csPath = "SoftwareMicrosoftOffice8.0ExcelMicrosoft Excel", csValue = "Options6"

On Error GoTo ErrFailed
If bDisableVirusChecking Then
lData = 0 'Disabled
Else
lData = 8 'Enabled
End If
RegCreateKey HKEY_CURRENT_USER, csPath, lRet
RegSetValueEx lRet, csValue, 0, REG_HEX, lData, 4
RegCloseKey lRet
MacroSecurity97 = True
Exit Function
ErrFailed:
MacroSecurity97 = False
End Function
 
Upvote 0
Russell Hauf said:
Is it me, or is that scary? How does this prevent "some pre-pubescent pleb that copied some malicious code from the internet" (Mark O'Brien's words, not mine) from creating his/her own signature?

Maybe it stores some of your computer's info? Todd, did you have to register anything online or anything like that?

YOU CAN NOT.
ALL YOU CAN DO IT CHANGE YOUR MACRO SECURITY TO LOW.
 
Upvote 0

Forum statistics

Threads
1,214,845
Messages
6,121,902
Members
449,053
Latest member
Guy Boot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top