Thanks I appreciate the response. This didn't quite do what I was looking for.
The scenario is I'm in Outlook, the Excel Workbook that is the database is not open. I want to run a macro in Outlook that accesses that Workbook without opening it, pulls out a piece of information, and sets a string to that value.
If the actual Workbook were open, and I wrote a macro in THAT workbook, this works perfectly.
Sub FindIndexNumber()
Dim strLM As String
Dim strIndex As String
Dim myRange As Range
strLM = InputBox("Enter LawMan#")
Set myRange = Range("a1:j18858")
strIndex = Application.WorksheetFunction.VLookup(strLM, myRange, 7, False)
Clipboard strIndex
End Sub
That code could, obviously, could use a lot of work up to make it user friendly but it works for now.
Basically, how do I have Outlook identify this Excel Workbook, which is not open, and run a code that serves the same function ... look up data in one column, get data from another column in the same row.
Any thoughts?