Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Pop up message box?

Is there a way to create a pop up message in Excel upon opening a workbook?
I want to create something along the lines of "resave this file as xxxx".
--
Gracie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Pop up message box?

Hi,
Alt+F11 to open vb editor. Double click 'this workbook' and paste this in on
the right. The messagebox dies after 4 seconds if a button isn't pressed.


Private Sub Workbook_Open()
Dim MyBox As Object
Dim Duration As Long
Duration = 4 'Seconds
Msg = "Save workbook as ******"
Ttl = " Your Title"
Set MyBox = CreateObject("WScript.Shell")
response = MyBox.PoPup(Msg, Duration, Ttl, vbOKCancel)
End Sub

Mike
"Graciegirl" wrote:

Is there a way to create a pop up message in Excel upon opening a workbook?
I want to create something along the lines of "resave this file as xxxx".
--
Gracie

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Pop up message box?

Easily done but you might prefer to take the user out of the process and
save the workbook as your new name when you close it?

For the pop-up upon opening...................

Private Sub Workbook_Open()
MsgBox "This file must be re-saved as XXXX"
End Sub

To saveas XXXX.xls when closing...................

Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Note that any existing "XXXX" workbook is overwritten
If ActiveWorkbook.Name = "XXXX.xls" Then Exit Sub
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs Filename:="XXXX.xls"
ActiveWorkbook.Save 'saves original workbook also
Application.DisplayAlerts = True
End Sub

Both of these go into Thisworkbook module.

Right-click on the Excel Icon left of "file" on the worksheet menu bar and
select "View Code"

Paste whichever event you want into that module.


Gord Dibben MS Excel MVP

On Tue, 23 Sep 2008 13:33:01 -0700, Graciegirl
wrote:

Is there a way to create a pop up message in Excel upon opening a workbook?
I want to create something along the lines of "resave this file as xxxx".


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
Pop up message Jhadur Excel Discussion (Misc queries) 1 October 9th 07 04:44 PM
If then Message Box Nikki Excel Discussion (Misc queries) 8 December 22nd 05 02:41 PM
How do I get rid of the #/DIV/0! message Marshall Scmidt Excel Worksheet Functions 3 August 3rd 05 05:50 PM
Pop up message esei Excel Discussion (Misc queries) 3 April 4th 05 07:44 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM


All times are GMT +1. The time now is 05:49 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"