Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 07 won't exit | Setting up and Configuration of Excel | |||
macro wants to exit excel | Excel Discussion (Misc queries) | |||
Excel - Prompt to save on exit. | Excel Discussion (Misc queries) | |||
Excel 2003 Will Not Save On Exit | Excel Discussion (Misc queries) | |||
exit excel | Excel Discussion (Misc queries) |