LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Macro Exit or Link

I am creating a macro that when someone agrees the macro will take someone to
the home page, if they say no, then a message will come up "saying something"
and will exit from the workbook. This is what i have so far:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = True
If Target.Address = "$C$15" Then
If Me.Range("C15").Value = "Yes" Then
Worksheets("Home").Range "F8"
End If
If Me.Range("C15").Value = "No" Then
ThisWorkbook Application.Quit
End If
End If

ws_exit:
Application.EnableEvents = True

End Sub


Can someone assist me?

Thank you,

Dan
 
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
Run macro on exit Steve Excel Discussion (Misc queries) 12 October 25th 09 01:43 PM
macro wants to exit excel curlydave Excel Discussion (Misc queries) 3 July 2nd 06 04:19 PM
Exit via macro only? Brisbane Rob Excel Discussion (Misc queries) 1 October 13th 05 01:16 PM
on exit macro ditchy Excel Discussion (Misc queries) 2 May 3rd 05 12:11 AM
Run Macro on cell exit Kelly Excel Programming 7 May 5th 04 09:42 PM


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

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

About Us

"It's about Microsoft Excel"