0

When I run this code, I get an error saying that I have a run time error 6

Dim ProjectNumber As Integer
Dim XProjectFolder As String


ProjectNumber = projectinfosheet.Range("B10")

If Target.Address = "$B$10" Then

    XProjectFolder = Application.WorksheetFunction.VLookup(ProjectNumber & "*", FolderRng, 1, False)
    projectinfosheet.Range("E1").Value = XProjectFolder
    MsgBox XProjectFolder
End if

But when I comment Dim ProjectNumber As Integer out, the code run smoothly. Am I dimensioning my variables incorrectly?

RawrRawr7
  • 331
  • 2
  • 10

0 Answers0