Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am confused, I want to create a global variable called: bSELCTIONCHANGE. I
read through the other posts and thought that I had to place the global variable before the Private Sub. But I get an error saying I have an Invalid Outside Procedure. Where does the global variable belong? I have another macro which sets bSELCTIONCHANGE to false to prevent the Private Sub from running. bSELCTIONCHANGE Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If bSELCTIONCHANGE Then 'Backup Board If Not Application.Intersect(Target, Range("D5, D7, D9, D11, D13, D15, D17, D19")) Is Nothing Then Sunday_Route_Selection.Show 'Relief Board If Not Application.Intersect(Target, Range("D22, D24, D26, D28, D30, D32, D34, D36, D38, D40, D42, D44, D46")) Is Nothing Then Sunday_Route_Selection.Show 'Part Time Available If Not Application.Intersect(Target, Range("D50, D52, D54, D56, D58, D60, D62, D64, D66, D68, D70")) Is Nothing Then Sunday_Route_Selection.Show 'Overtime and Miscellaneous Assignments If Not Application.Intersect(Target, Range("D86, D88, D90, D92, D94, D96, D98, D100, D102, D104, D106, D108, D110, D112, D114")) Is Nothing Then Sunday_Route_Selection.Show 'Routes To Cover If Not Application.Intersect(Target, Range("D119:D147")) Is Nothing Then Sunday_Routes_to_Cover.Show End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Global variable | Excel Discussion (Misc queries) | |||
Global Variable | Excel Discussion (Misc queries) | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
userform variable as global | Excel Programming | |||
Global variable | Excel Programming |