no macro warning! - Page 2
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: no macro warning!

  1. #11
    Guest

    Default

     
    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??

  2. #12
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,605
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.

  3. #13
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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.
    _________________
    [b] Mark O'Brien

    [ This Message was edited by: Mark O'Brien on 2002-03-12 18:22 ]

  4. #14
    Board Regular
    Join Date
    Feb 2002
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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!

  5. #15
    Guest

    Default

    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.

  6. #16
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    That anonymous post was me BTW. Got timed out again.

    (selecting "Keep Me Logged in", doesn't work for me)

  7. #17
    Board Regular
    Join Date
    Feb 2002
    Location
    Winnipeg, Manitoba, CANADA
    Posts
    144
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


  8. #18
    MrExcel MVP Russell Hauf's Avatar
    Join Date
    Feb 2002
    Location
    Portland, OR Area - USA
    Posts
    1,605
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This is a good read. I think the gist is be careful, even with digitally signed documents!

    http://www.sophos.com/virusinfo/whit...ffice2000.html

  9. #19
    Board Regular
    Join Date
    Feb 2002
    Location
    Winnipeg, Manitoba, CANADA
    Posts
    144
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

    Thanx.

  10. #20
    Board Regular
    Join Date
    Jul 2003
    Location
    San Francisco
    Posts
    112
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Quote Originally Posted by Russell Hauf
    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.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com