Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2011, 08:02 AM
Catalin.B Catalin.B is offline confirmation popup on excel sheet macro Windows Vista confirmation popup on excel sheet macro Office 2010 32bit
Expert
 
Join Date: May 2011
Location: Iaşi, Romānia
Posts: 386
Catalin.B is on a distinguished road
Default

You can try this:
Code:
sub deleteCells()
Dim Ask As Integer
 Ask = MsgBox(Prompt:="Is this What you want?", _
            Buttons:=vbYesNo, Title:="Confirmation required")
                If Ask = vbYes Then
     'delete your range
activesheet.range("A1:A10").clearContents
                 Else
                 
                 MsgBox "Cancelled by user..."
                                  Exit Sub
                 End If
end sub

Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debug for macro run through button only when sheet protected leahca Excel Programming 0 11-24-2011 04:47 AM
confirmation popup on excel sheet macro Insert Excel sheet markg2 Word 1 12-15-2010 12:19 PM
confirmation popup on excel sheet macro Any tutorial same as to this excel sheet with code? Learner7 Excel 1 05-18-2010 05:31 PM
confirmation popup on excel sheet macro Excel sheet Sequence Number belloffice Excel 1 02-25-2010 02:41 PM
copy cell from sheet 2 to sheet 3 macro slipperyjim Excel Programming 1 02-18-2010 01:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft