Worksheet Vs. General

MarkReddell

Board Regular
Joined
Sep 1, 2011
Messages
210
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Is there a way to do any macro calls from a General position instead of the
Worksheet_Change Mode? For ex.: Private Sub Worksheet_Change(ByVal Target As Range)
CheckArea = "A1:G19" 'The area to be monitored PUT YOUR VALUE
If Application.Intersect(Target, Range(CheckArea)) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Address(False, False) = "A1" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A2" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A3" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A4" And Target.Value <> "" Then Call SORT_LIST
If Range("G4").Value = 1 Then Call ONE_SCENARIO
If Range("G4").Value = 2 Then Call SHOW_TWO_SCENARIOS
If Range("G4").Value = 3 Then Call SHOW_THREE_SCENARIOS
If Range("G4").Value = 4 Then Call SHOW_FOUR_SCENARIOS
If Range("A17").Value = "YES" Then Call SHOW_TERMS_ONLY
If Range("A17").Value = "NO" Then Call DONT_SHOW_TERMS_ONLY
If Target.Address = "$B$2" Then Application.Run Target.Value
Application.EnableEvents = True
End Sub
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
this can not be triggered in a general module it must be in a worksheet
module as it is an event Macro so by taking an action it causes a reaction.

If you only want certain things to happen at certain times you have the option for worksheet open etc but after that you need a different macro
 
Upvote 0
Thx every much!!! I've been playing with XL 4 about 15 yrs. However, I'm new 2 VBA!!! I feel like a fish out of water!!!! Happy Thanksgiving & Merry Christmas!!! & remember, lets keep the Christ in Christmas!!! Be Blessed IN HIM!!!:LOL:
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top