Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Guido van Lammeren
 
Posts: n/a
Default Adding message window

Does anyone know if it possible (and how ofcourse) to make a pop-up message
window in excel that operates on the (Macro-)button. It has to contain a
choice option to operate the (macro-)button.

If the (macro-)button is used I want to make add a window which contains a
text saying:
"are you sure you want to delete the last year?"
CHOICHE OPTION: "YES" or "NO"

The macro will be run (and remove the appropriate collumns) if yes is
pressed and other wise return to the previous screen.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Dim Resp as long

resp = msgbox(Prompt:="Are you sure", buttons:=vbyesno)

if resp = vbyes then
'user hit yes
else
'user hit no
end if



Guido van Lammeren wrote:

Does anyone know if it possible (and how ofcourse) to make a pop-up message
window in excel that operates on the (Macro-)button. It has to contain a
choice option to operate the (macro-)button.

If the (macro-)button is used I want to make add a window which contains a
text saying:
"are you sure you want to delete the last year?"
CHOICHE OPTION: "YES" or "NO"

The macro will be run (and remove the appropriate collumns) if yes is
pressed and other wise return to the previous screen.


--

Dave Peterson
  #3   Report Post  
Chris Lavender
 
Posts: n/a
Default

I assume by (Macro-)button you mean a command button inserted into the
sheet?

Sub Button1_Click()
Dim response As String
response = MsgBox("Are you sure you want to delete the last year?"",
vbYesNo, "Warning!")
If response = vbYes Then
[your macro]
End If
End Sub

Best rgds
Chris Lav

"Guido van Lammeren" <Guido van wrote in
message ...
Does anyone know if it possible (and how ofcourse) to make a pop-up

message
window in excel that operates on the (Macro-)button. It has to contain a
choice option to operate the (macro-)button.

If the (macro-)button is used I want to make add a window which contains a
text saying:
"are you sure you want to delete the last year?"
CHOICHE OPTION: "YES" or "NO"

The macro will be run (and remove the appropriate collumns) if yes is
pressed and other wise return to the previous screen.



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
The formula Watch Window in Excel should allow more than one row Fabiano Excel Worksheet Functions 0 July 11th 05 12:19 PM
Check box and and formula Russell-stanely Excel Discussion (Misc queries) 7 July 7th 05 09:06 PM
Getting an error message "Cannot shift objects off of sheet" carey Excel Discussion (Misc queries) 11 July 3rd 05 02:13 AM
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 08:22 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"