+ Reply to Thread
Results 1 to 7 of 7

Security setting on Low, but Macro will not run?

  1. #1
    Forum Contributor
    Join Date
    06-02-2005
    Posts
    100

    Security setting on Low, but Macro will not run?

    Hi all,

    I'm a bit puzzled. I wrote an app for some users (which runs just fine and dandy on the box I developed it on), but it will not execute certain code on other boxes.

    Their security settings are set to Low and the excel file itself loads just fine. But when they hit certain command buttons within the app, I get a windows error "Security Settings do not allow this macro to run."

    Is this a Windows setting thing (we run Windows 2000 w/ service pack 4 if that matters) where windows itself has been set to block macros from running, or is this an excel thing that I just don't understand?

    And again, the app runs just fine on the box I wrote it on. It's just everywhere else that has this issue (rather embarassing when I was demoing it....)

  2. #2
    Dave Peterson
    Guest

    Re: Security setting on Low, but Macro will not run?

    When you changed that security level to low, did you close and reopen the
    workbook with macros?

    This setting isn't retroactive.

    Ouka wrote:
    >
    > Hi all,
    >
    > I'm a bit puzzled. I wrote an app for some users (which runs just fine
    > and dandy on the box I developed it on), but it will not execute certain
    > code on other boxes.
    >
    > Their security settings are set to Low and the excel file itself loads
    > just fine. But when they hit certain command buttons within the app, I
    > get a windows error "Security Settings do not allow this macro to run."
    >
    > Is this a Windows setting thing (we run Windows 2000 w/ service pack 4
    > if that matters) where windows itself has been set to block macros from
    > running, or is this an excel thing that I just don't understand?
    >
    > And again, the app runs just fine on the box I wrote it on. It's just
    > everywhere else that has this issue (rather embarassing when I was
    > demoing it....)
    >
    > --
    > Ouka
    > ------------------------------------------------------------------------
    > Ouka's Profile: http://www.excelforum.com/member.php...o&userid=23988
    > View this thread: http://www.excelforum.com/showthread...hreadid=401595


    --

    Dave Peterson

  3. #3
    Forum Contributor
    Join Date
    06-02-2005
    Posts
    100
    Yes.

    All machines that need to run the app have had their security settings changed to low and yet the problem persists even after a restart of the program AND a restart of the machine.

  4. #4
    Forum Contributor
    Join Date
    06-02-2005
    Posts
    100
    ok, figured out the error message was part of an error handling script I included and forgot about. commenting out that script I still error out in this app on all machines except the machine I wrote it on.

    I have narrowed down the error to this line of code:

    Dim TempForm as Object
    Set TempForm = ThisWorkbook.VBProject.VBCompenents.Add(3)

    Here of course I'm trying to add a form at runtime. But why would the above code not work on anymachine but the one I've developed the app on??

  5. #5
    NickHK
    Guest

    Re: Security setting on Low, but Macro will not run?

    Ouka,
    Is the project protected/signed ?

    NickHK

    "Ouka" <Ouka.1uygyi_1126040844.9057@excelforum-nospam.com> wrote in message
    news:Ouka.1uygyi_1126040844.9057@excelforum-nospam.com...
    >
    > ok, figured out the error message was part of an error handling script I
    > included and forgot about. commenting out that script I still error out
    > in this app on all machines except the machine I wrote it on.
    >
    > I have narrowed down the error to this line of code:
    >
    > Dim TempForm as Object
    > Set TempForm = ThisWorkbook.VBProject.VBCompenents.Add(3)
    >
    > Here of course I'm trying to add a form at runtime. But why would the
    > above code not work on anymachine but the one I've developed the app
    > on??
    >
    >
    > --
    > Ouka
    > ------------------------------------------------------------------------
    > Ouka's Profile:

    http://www.excelforum.com/member.php...o&userid=23988
    > View this thread: http://www.excelforum.com/showthread...hreadid=401595
    >




  6. #6
    Forum Contributor
    Join Date
    06-02-2005
    Posts
    100
    No, no protections are enabled.

    The problem seems to be this line:

    Set TempForm = ThisWorkbook.VBProject.VBComponents.Add(3)

    A copy/paste of this line in it's own procedure will open a userform upon execution on my dev box, but returns a 1004 error on other boxes.

    If this line works on the dev box but not on others, mayhap there is a reference that is enabled on my box that others don't have??

  7. #7
    Peter T
    Guest

    Re: Security setting on Low, but Macro will not run?

    Have you checked
    "Trust Access To Visual Basic Project"
    via Macros, Security, "Trusted Sources"

    Regards,
    Peter T

    "Ouka" <Ouka.1v0eei_1126130727.1911@excelforum-nospam.com> wrote in message
    news:Ouka.1v0eei_1126130727.1911@excelforum-nospam.com...
    >
    > No, no protections are enabled.
    >
    > The problem seems to be this line:
    >
    > Set TempForm = ThisWorkbook.VBProject.VBComponents.Add(3)
    >
    > A copy/paste of this line in it's own procedure will open a userform
    > upon execution on my dev box, but returns a 1004 error on other boxes.
    >
    > If this line works on the dev box but not on others, mayhap there is a
    > reference that is enabled on my box that others don't have??
    >
    >
    > --
    > Ouka
    > ------------------------------------------------------------------------
    > Ouka's Profile:

    http://www.excelforum.com/member.php...o&userid=23988
    > View this thread: http://www.excelforum.com/showthread...hreadid=401595
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1