Hi,
I'm getting a run time error 1004
Application-defined or object-defined error
What I'm trying to do is to link the value from another sheet.
The error is raised at: ActiveCell.Offset...... line
VB Code:
Sub Linker(Dis As String) TDis = Dis With Sheets("Total").Range("A1:A500") Set b = .Find(TDis) 'Find the district aadd = b.Address End With Sheets("Total").Select ActiveSheet.Range([aadd]).Activate 'Put the formulas where it should be ActiveCell.Offset(0, 2).Formula = "= " & TDis & " ! " & gtotactsalesw & " " End Sub
The name of the sheet is coming by Dis who is a String
gtotactsalesw is also a String
Usually in an excel cell you link a value from another by entering the formula =sheet!cell
But don't seems to do the trick here.
Any help or hint would be appreciated.
thanks




Reply With Quote