I am trying to pass a variable called "Filter" from a Private Sub to a Module but keeping coming up with a zero value in the Module. I tried to make the variable Global but that didn't seem to work. Any suggestions for a solution is appreciated. Thanks.
Private Sub Code as follows:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim i As Long
Dim LastRow As Long
Dim Rep As String
Dim Color As Long
Dim Filter As Long
Filter = 1
Global Variables as follows:
Global SortByColumn As Long
Global SortOrder As Long
Global Filter As Long
Module Code as follows:
Sub MoodysSort()
Dim i As Long
Dim lngSortIndex As Long
Dim EndRow As Long
If Filter = 0 Then
'do something
Else
'do something else
End If
Bookmarks