Hi Friends,
I am trying to pass the formula which gives a range of cells to a function called concatenate_Text which is defined as
Public Function Concatenate_Text(Textrange As Range) As String
Dim str_text As String
Dim var_cell As Variant
For Each var_cell In Textrange
str_text = str_text & " " & var_cell
Next
Concatenate_Text = str_text
End Function
The macro that passes the range is this
Dim TopCell As Range
TopCell = "OFFSET('Data Tab'!$A$2,0,$B$16 - 1,INDEX($B$1:$B$15,$B$16,1),1))"
Concatenate_Text (TopCell)
When I try to execute this, it gives me an error saying "Object Required" error. The catch is "I want to send the results of the formula to the function Concatenate_Text ........
Kindly explain where I am going wrong.
Thanks in advance for your time
Bookmarks