+ Reply to Thread
Results 1 to 11 of 11

Copyright message?

  1. #1
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102

    Copyright message?

    Hi,

    Is there any way of creating some form of copyright message that pops up when a user opens a particular workbook? They then have to agree to the terms to enter.

    Thanks,

    Mark.

  2. #2
    Bob Phillips
    Guest

    Re: Copyright message?

    Not foolproof but one way

    Private Sub Workbook_Open()
    ans = MsgBox("© MEvetts", vbOKCancel)
    If ans = vbCancel Then
    ThisWorkbook.Close savechanges:=False
    End If
    End Sub

    'This is workbook event code.
    'To input this code, right click on the Excel icon on the worksheet
    '(or next to the File menu if you maximise your workbooks),
    'select View Code from the menu, and paste the code


    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "mevetts" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi,
    >
    > Is there any way of creating some form of copyright message that pops
    > up when a user opens a particular workbook? They then have to agree to
    > the terms to enter.
    >
    > Thanks,
    >
    > Mark.
    >
    >
    > --
    > mevetts
    >
    >
    > ------------------------------------------------------------------------
    > mevetts's Profile:

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




  3. #3
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    Hi,

    I have pasted the code in, but I get an error message in Visual Basic when I open the workbook.

    It says - 'Compile error: Ambigious name detected: Workbook_Open'

    Any thoughts?

  4. #4
    Dave Peterson
    Guest

    Re: Copyright message?

    You only get one workbook_open event.

    So you'll have to extract Bob's code and merge it into your existing
    workbook_open routine.



    mevetts wrote:
    >
    > Hi,
    >
    > I have pasted the code in, but I get an error message in Visual Basic
    > when I open the workbook.
    >
    > It says - 'Compile error: Ambigious name detected: Workbook_Open'
    >
    > Any thoughts?
    >
    > --
    > mevetts
    >
    > ------------------------------------------------------------------------
    > mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
    > View this thread: http://www.excelforum.com/showthread...hreadid=496603


    --

    Dave Peterson

  5. #5
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    Ah, ok. Thanks, will do.

  6. #6
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    It works nicely, thanks. It is dependent on the user enabling macros, but they need to do this anyway.

    Thanks again.

  7. #7
    Dave Peterson
    Guest

    Re: Copyright message?

    If macros aren't enabled, then none of your macros will work. (You can't use
    macros in the workbook to enable macros for that workbook.)

    mevetts wrote:
    >
    > It works nicely, thanks. It is dependent on the user enabling macros,
    > but they need to do this anyway.
    >
    > Thanks again.
    >
    > --
    > mevetts
    >
    > ------------------------------------------------------------------------
    > mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
    > View this thread: http://www.excelforum.com/showthread...hreadid=496603


    --

    Dave Peterson

  8. #8
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    Indeed.


  9. #9
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    Is there any way of creating a line break in the text?

    I would like two short pieces of info in the pop up, but I don't know how to create a new paragraph. When I just hit enter in the code it turns the line to red and gives and error message!

    Cheers.

  10. #10
    Dave Peterson
    Guest

    Re: Copyright message?

    Private Sub Workbook_Open()
    ans = MsgBox("© MEvetts" & vblf & "second line" & vblf _
    vblf & "another line", vbOKCancel)
    If ans = vbCancel Then
    ThisWorkbook.Close savechanges:=False
    End If
    End Sub

    mevetts wrote:
    >
    > Is there any way of creating a line break in the text?
    >
    > I would like two short pieces of info in the pop up, but I don't know
    > how to create a new paragraph. When I just hit enter in the code it
    > turns the line to red and gives and error message!
    >
    > Cheers.
    >
    > --
    > mevetts
    >
    > ------------------------------------------------------------------------
    > mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
    > View this thread: http://www.excelforum.com/showthread...hreadid=496603


    --

    Dave Peterson

  11. #11
    Forum Contributor
    Join Date
    11-27-2005
    Location
    UK
    Posts
    102
    Thanks Dave, I've soooo much to learn!

+ 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