Hi all. Here's my problem. I've declared some variables as follows:
Public activityone As String
Public allactivities As Range
I'm using public variables because I'm lazy. I set allactivities:
Set allactivities = Worksheets("data").Range("G5:N14")
Problem: When I run the following code, I get a "Runtime error 1004: Application-defined or object-defined error":
activityone = Worksheets("data").Range("G19").Value
If MTdone = True Then
activityone = Application.WorksheetFunction.VLookup(activityone, allactivities, 2, False)
End If
What am I doing wrong? It only happens when MTdone is True, so it has to be that line of code.
Bookmarks