Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Hyperlink to exit Excel

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Hyperlink to exit Excel


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

Great TY

"Gary''s Student" wrote:


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

Can I change the code to read
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet1!G7" Then
Application.Quit
End If
End Sub


If I make the hyperlink to G7 in sheet 1
"Gary''s Student" wrote:


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Hyperlink to exit Excel

Give it a try. (you can't really break anthing)
--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Can I change the code to read
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet1!G7" Then
Application.Quit
End If
End Sub


If I make the hyperlink to G7 in sheet 1
"Gary''s Student" wrote:


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

If I put the hyperlink in sheet 1 G7 as opposed to Sheet 2 A1 and chnage the
code to G7 it does not work. If I leave it as originally planned in sheet2 A1
then it works.
I am trying to make this as simple as possible for folks who are nto
computer illiterate. Or at lewast less then I am. If I can out the code to
exit the program in sheet 1 cell g7 is a convient cell.

THANKS

"Gary''s Student" wrote:

Give it a try. (you can't really break anthing)
--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Can I change the code to read
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet1!G7" Then
Application.Quit
End If
End Sub


If I make the hyperlink to G7 in sheet 1
"Gary''s Student" wrote:


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

I understand about making the hyperlink where is the worksheet code area??

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default Hyperlink to exit Excel

works fine once I change "Sheet2!A1" to exit the name of the hyperlink

THANK YOU

"Gary''s Student" wrote:

Click on cell A1 in Sheet2 and:

Insert Hyperlink to a place in this document

This will create a hyperlink to itself. Then in the worksheet code area,
insert the following:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Parent = "Sheet2!A1" Then
Application.Quit
End If
End Sub

--
Gary''s Student - gsnu200781


"Pimamedic" wrote:

Is there a way in Excel 2002 to make a link so that one click will close the
program, take me to the exit routine?

Thank you

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
Excel 07 won't exit Elle Setting up and Configuration of Excel 0 July 27th 07 12:40 AM
macro wants to exit excel curlydave Excel Discussion (Misc queries) 3 July 2nd 06 04:19 PM
Excel - Prompt to save on exit. Fenris Excel Discussion (Misc queries) 0 November 21st 05 05:11 PM
Excel 2003 Will Not Save On Exit tmyhlfgr Excel Discussion (Misc queries) 2 November 3rd 05 02:45 PM
exit excel welshwizzard Excel Discussion (Misc queries) 1 January 18th 05 12:02 AM


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