#1   Report Post  
JaB
 
Posts: n/a
Default Message boxes

Hi there

Does anyone know how to create pop up message boxes? Basically Id like a
box that pops up when a user opens the spreadsheet and asks, 'Update?' with a
'Yes' or'No' selection option.
Ive seen it in other spreadsheets, but not sure how to do it.

Thanks
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Message boxes

Private Sub Workbook_Open()
Dim ans
ans = MsgBox("Update")
If ans = vbYes Then
'do something
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

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


"JaB" wrote in message
...
Hi there

Does anyone know how to create pop up message boxes? Basically Id like a
box that pops up when a user opens the spreadsheet and asks, 'Update?'

with a
'Yes' or'No' selection option.
Ive seen it in other spreadsheets, but not sure how to do it.

Thanks



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
Calculations And Order In Macros Carl Bowman Excel Discussion (Misc queries) 4 February 23rd 05 10:53 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


All times are GMT +1. The time now is 05:31 PM.

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"