hi all,
i have an error in my excel spreadsheet. i call an UDF that call a macro. the macro works if i launch it directly but when the macro is called by my function and try to change a value for a range or a cell there is an error.
here my vba code.
please can tell how to make it works.
Thank in advance.
-----------
Public Function gethello() As String
Hello
getAlaskaDatas = "hello"
End Function
Sub Hello()
On Error GoTo funcfail
Dim iCol As Integer
Dim lRow As Long
Dim sText As String
iCol = 2
lRow = 3
sText = "Hello Excel"
Worksheets(1).Range("A1:B3").Value = sText
Exit Sub
funcfail:
MsgBox Err.Description
End Sub