liam-the-1-n-only
New Member
- Joined
- Oct 14, 2013
- Messages
- 4
Good Morning All
Any help with this issue would be greatly appreciated, i cannot seem to figure out why this wont work..?
If i do the below i get , "unable to get vlookup property of worksheetfunction class"
If i do this ;
i get this in the relevant cell, =VLOOKUP(refcell, lookuprange, cs, Boo)
this issue has been causing me hours of headaches and forum posting to no provale so any help would be GREAT!
Thanks
Liam
Any help with this issue would be greatly appreciated, i cannot seem to figure out why this wont work..?
Code:
Dim refcell As String
Dim Location As String
Dim excelname As String
Dim ext As String
Dim r As String
Dim lookuprange As String
Dim cs As Integer
Dim Boo As Boolean
Dim Row As Integer
Row = ActiveCell.Row
refcell = "$A" & Row
Location = "'D:\Documents and Settings\*****\Desktop\vb excel\testing docs\"
Name = "[" & Format(Date, "dd.mm.yy")
ext = ".xlsx]"
excelname = Name & ext
r = "Sheet1'!$A:$AS"
lookuprange = Location & excelname & r
cs = 40
Boo = False
If i do the below i get , "unable to get vlookup property of worksheetfunction class"
Code:
ActiveCell.Value = Application.WorksheetFunction.VLookup("refcell", "lookuprange", "cs", "Boo")
If i do this ;
Code:
ActiveCell.Formula = "=VLookup(refcell, lookuprange, cs, Boo)"
i get this in the relevant cell, =VLOOKUP(refcell, lookuprange, cs, Boo)
this issue has been causing me hours of headaches and forum posting to no provale so any help would be GREAT!
Thanks
Liam