MickFlanagen
New Member
- Joined
- Jan 24, 2012
- Messages
- 27
Good Morning,
I've done all kinds of searching, around this message board and other places, and I cannot figure out why I am getting an error here:
For the record qtwo is defined using a text box much earlier in the code:
The error I am getting is "Run-timer error '1004': Application-defined or object defined error"
Any help is appreciated.
Thanks,
Mick
I've done all kinds of searching, around this message board and other places, and I cannot figure out why I am getting an error here:
Code:
ActiveCell.FormulaR1C1 = "=(IF(ISERROR(VLOOKUP($B6," & [I]Qtwo[/I] & "$C$2:$BE$92,54,FALSE)),""No Data"",VLOOKUP($B6," & [I]Qtwo[/I] & "!$C$2:$BE$92,54,FALSE)))"
Code:
Dim qone As String
Dim qtwo As String
qone = InputBox("Enter the factor name", "factor name")
qtwo = InputBox("Enter Shortname", "short name")
Selection.AutoFilter Field:=1, Criteria1:=qone
Sheets.Add(Type:="C:\Documents and Settings\rutadav\Application Data\Microsoft\Templates\WB Data Template").Name = qtwo
Any help is appreciated.
Thanks,
Mick