#1   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default 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.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=496603

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default 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" wrote in
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.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


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

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


Ah, ok. Thanks, will do.


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=496603



  #6   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


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

  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


Indeed.

;)


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=496603

  #9   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


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

  #10   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
mevetts
 
Posts: n/a
Default Copyright message?


Thanks Dave, I've soooo much to learn!


--
mevetts


------------------------------------------------------------------------
mevetts's Profile: http://www.excelforum.com/member.php...o&userid=29130
View this thread: http://www.excelforum.com/showthread...hreadid=496603

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I control where the input message appears? Bernina27 Excel Discussion (Misc queries) 2 September 16th 05 03:04 AM
Adding an error message at close of file when criteria are met Dave Excel Discussion (Misc queries) 3 August 12th 05 07:56 PM
when opening excel I receive a message that says file can't be fo. Ken Excel Discussion (Misc queries) 3 February 22nd 05 12:13 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
Pivot Table not valid error message when formatting data 'button'. MDW Excel Discussion (Misc queries) 0 January 27th 05 03:01 PM


All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"