Code to open external workbook
Closed
G
-
Nov 24, 2010 at 11:03 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 30, 2010 at 10:25 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 30, 2010 at 10:25 AM
Related:
- Code to open external workbook
- Battery reset code - Guide
- Samsung volume increase code - Guide
- How to get whatsapp verification code online - Guide
- Cs 1.6 code - Guide
- Samsung keypad reset code - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Nov 30, 2010 at 10:25 AM
Nov 30, 2010 at 10:25 AM
Hi G,
OK, so you have an open workbook where you input someone's age in cell A1.
Whenever the entered age drops below 12 you want to open a specific workbook. If this is correct use the following code, which you implement in the sheet where the age is entered (right click on sheets tab and select "view code"):
Let me know how this works for you.
Best regards,
Trowa
OK, so you have an open workbook where you input someone's age in cell A1.
Whenever the entered age drops below 12 you want to open a specific workbook. If this is correct use the following code, which you implement in the sheet where the age is entered (right click on sheets tab and select "view code"):
Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("A1")) Is Nothing Then Exit Sub If Range("A1") < 12 Then Workbooks.Open Filename:="EnterYourFilenamesFullPathLike: C:\Excel\Master Kids 2010.xlsm" End Sub
Let me know how this works for you.
Best regards,
Trowa