+ Reply to Thread
Results 1 to 5 of 5

Bypass an

Hybrid View

  1. #1
    Ken Loomis
    Guest

    Bypass an

    When I created the latest versions of my Excel project, I included this
    code:


    Private Sub Workbook_Open()

    CopyrightAnnouncement

    End Sub


    Sub CopyrightAnnouncement()


    Dim Config As Integer
    Dim Ans As Integer

    Config = vbYesNo + vbQuestion + vbDefaultButton2

    Ans = MsgBox("This program is copyrigted and is currently only
    licensed on loan to and for the exclusive use of Sherri Allen. All
    rights are retained by the owner and deleveloper, Ken Loomis. Are you
    Sherri Allen?", Config)
    If Ans <> vbYes Then
    ActiveWindow.Close
    End If

    End Sub

    I though that would help me be sure that only one person used this file.

    But now that I need to open and fix all the files that this project created,
    it seems to be a problem.

    Is there a way to open those files without having to make the user answer
    that dialog box?

    Thanks,
    Ken








  2. #2
    JMB
    Guest

    RE: Bypass an

    One way is to hold down the SHIFT key when opening the file in Excel.

    Also, Excel has a command line switch that prevents workbooks from opening
    automatically as well as prevents auto-open macros from running.

    Excel.exe /automation



    "Ken Loomis" wrote:

    > When I created the latest versions of my Excel project, I included this
    > code:
    >
    >
    > Private Sub Workbook_Open()
    >
    > CopyrightAnnouncement
    >
    > End Sub
    >
    >
    > Sub CopyrightAnnouncement()
    >
    >
    > Dim Config As Integer
    > Dim Ans As Integer
    >
    > Config = vbYesNo + vbQuestion + vbDefaultButton2
    >
    > Ans = MsgBox("This program is copyrigted and is currently only
    > licensed on loan to and for the exclusive use of Sherri Allen. All
    > rights are retained by the owner and deleveloper, Ken Loomis. Are you
    > Sherri Allen?", Config)
    > If Ans <> vbYes Then
    > ActiveWindow.Close
    > End If
    >
    > End Sub
    >
    > I though that would help me be sure that only one person used this file.
    >
    > But now that I need to open and fix all the files that this project created,
    > it seems to be a problem.
    >
    > Is there a way to open those files without having to make the user answer
    > that dialog box?
    >
    > Thanks,
    > Ken
    >
    >
    >
    >
    >
    >
    >
    >


  3. #3
    Ken Loomis
    Guest

    Re: Bypass an

    Can you please suggest how to do that in VBA?

    thanks,
    Kemn

    "JMB" <JMB@discussions.microsoft.com> wrote in message
    news:B5154E46-0DC3-4C47-B464-C0A34372D35D@microsoft.com...
    > One way is to hold down the SHIFT key when opening the file in Excel.
    >
    > Also, Excel has a command line switch that prevents workbooks from opening
    > automatically as well as prevents auto-open macros from running.
    >
    > Excel.exe /automation
    >
    >
    >
    > "Ken Loomis" wrote:
    >
    >> When I created the latest versions of my Excel project, I included this
    >> code:
    >>
    >>
    >> Private Sub Workbook_Open()
    >>
    >> CopyrightAnnouncement
    >>
    >> End Sub
    >>
    >>
    >> Sub CopyrightAnnouncement()
    >>
    >>
    >> Dim Config As Integer
    >> Dim Ans As Integer
    >>
    >> Config = vbYesNo + vbQuestion + vbDefaultButton2
    >>
    >> Ans = MsgBox("This program is copyrigted and is currently only
    >> licensed on loan to and for the exclusive use of Sherri Allen. All
    >> rights are retained by the owner and deleveloper, Ken Loomis. Are you
    >> Sherri Allen?", Config)
    >> If Ans <> vbYes Then
    >> ActiveWindow.Close
    >> End If
    >>
    >> End Sub
    >>
    >> I though that would help me be sure that only one person used this file.
    >>
    >> But now that I need to open and fix all the files that this project
    >> created,
    >> it seems to be a problem.
    >>
    >> Is there a way to open those files without having to make the user answer
    >> that dialog box?
    >>
    >> Thanks,
    >> Ken
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>




  4. #4
    keepITcool
    Guest

    Re: Bypass an

    ken

    process the files while
    application.enableevents=false

    then the workbook_open and all other events wont fire.



    --
    keepITcool
    | www.XLsupport.com | keepITcool chello nl | amsterdam


    Ken Loomis wrote :

    > Can you please suggest how to do that in VBA?
    >
    > thanks,
    > Kemn
    >
    > "JMB" <JMB@discussions.microsoft.com> wrote in message
    > news:B5154E46-0DC3-4C47-B464-C0A34372D35D@microsoft.com...
    > > One way is to hold down the SHIFT key when opening the file in
    > > Excel.
    > >
    > > Also, Excel has a command line switch that prevents workbooks from
    > > opening automatically as well as prevents auto-open macros from
    > > running.
    > >
    > > Excel.exe /automation
    > >
    > >
    > >
    > > "Ken Loomis" wrote:
    > >
    > >> When I created the latest versions of my Excel project, I included

    > this >> code:
    > > >
    > > >
    > >> Private Sub Workbook_Open()
    > > >
    > >> CopyrightAnnouncement
    > > >
    > >> End Sub
    > > >
    > > >
    > >> Sub CopyrightAnnouncement()
    > > >
    > > >
    > >> Dim Config As Integer
    > >> Dim Ans As Integer
    > > >
    > >> Config = vbYesNo + vbQuestion + vbDefaultButton2
    > > >
    > >> Ans = MsgBox("This program is copyrigted and is currently only
    > >> licensed on loan to and for the exclusive use of Sherri Allen. All
    > >> rights are retained by the owner and deleveloper, Ken Loomis. Are

    > you >> Sherri Allen?", Config)
    > >> If Ans <> vbYes Then
    > >> ActiveWindow.Close
    > >> End If
    > > >
    > >> End Sub
    > > >
    > >> I though that would help me be sure that only one person used this

    > file.
    > > >
    > >> But now that I need to open and fix all the files that this

    > project >> created, >> it seems to be a problem.
    > > >
    > >> Is there a way to open those files without having to make the user

    > answer >> that dialog box?
    > > >
    > >> Thanks,
    > >> Ken
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > >>


  5. #5
    Bob Phillips
    Guest

    Re: Bypass an

    but do remember to set to true afterwards.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "keepITcool" <xrrcvgpbby@puryyb.ay> wrote in message
    news:xn0e4b08j2n7qye002keepitcoolnl@msnews.microsoft.com...
    > ken
    >
    > process the files while
    > application.enableevents=false
    >
    > then the workbook_open and all other events wont fire.
    >
    >
    >
    > --
    > keepITcool
    > | www.XLsupport.com | keepITcool chello nl | amsterdam
    >
    >
    > Ken Loomis wrote :
    >
    > > Can you please suggest how to do that in VBA?
    > >
    > > thanks,
    > > Kemn
    > >
    > > "JMB" <JMB@discussions.microsoft.com> wrote in message
    > > news:B5154E46-0DC3-4C47-B464-C0A34372D35D@microsoft.com...
    > > > One way is to hold down the SHIFT key when opening the file in
    > > > Excel.
    > > >
    > > > Also, Excel has a command line switch that prevents workbooks from
    > > > opening automatically as well as prevents auto-open macros from
    > > > running.
    > > >
    > > > Excel.exe /automation
    > > >
    > > >
    > > >
    > > > "Ken Loomis" wrote:
    > > >
    > > >> When I created the latest versions of my Excel project, I included

    > > this >> code:
    > > > >
    > > > >
    > > >> Private Sub Workbook_Open()
    > > > >
    > > >> CopyrightAnnouncement
    > > > >
    > > >> End Sub
    > > > >
    > > > >
    > > >> Sub CopyrightAnnouncement()
    > > > >
    > > > >
    > > >> Dim Config As Integer
    > > >> Dim Ans As Integer
    > > > >
    > > >> Config = vbYesNo + vbQuestion + vbDefaultButton2
    > > > >
    > > >> Ans = MsgBox("This program is copyrigted and is currently only
    > > >> licensed on loan to and for the exclusive use of Sherri Allen. All
    > > >> rights are retained by the owner and deleveloper, Ken Loomis. Are

    > > you >> Sherri Allen?", Config)
    > > >> If Ans <> vbYes Then
    > > >> ActiveWindow.Close
    > > >> End If
    > > > >
    > > >> End Sub
    > > > >
    > > >> I though that would help me be sure that only one person used this

    > > file.
    > > > >
    > > >> But now that I need to open and fix all the files that this

    > > project >> created, >> it seems to be a problem.
    > > > >
    > > >> Is there a way to open those files without having to make the user

    > > answer >> that dialog box?
    > > > >
    > > >> Thanks,
    > > >> Ken
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > >>




+ 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