View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
xtriant xtriant is offline
external usenet poster
 
Posts: 6
Default function with more functionality then typical UDFs?

On 5 Jan., 17:09, Master Blaster wrote:
Perhaps this helps you further:

in a module use this:
----------------------------------------------------------------------
Function testfunction(a, b As Integer)
stringtp = a & "," & b
testfunction = stringtp
End Function
----------------------------------------------------------------------
*on the worksheet use this:

----------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
* * If Not Application.Intersect(Range("a1"), Target) Is Nothing Then

ar = ActiveCell.Row
ac = ActiveCell.Column

st1 = Cells(1, 1)
dd = Left(st1, 1)
ee = Right(st1, 1)

qq = InputBox("fill-in")

For r = ar To ar + dd
* For c = ac To ac + ee
* * *Cells(r, c) = qq
* Next c
Next r

End If
End Sub
----------------------------------------------------------------------

hope this helps




Thanks very much for the answers to far but I am afraid, my problem
remains. In fact, the best way for me would be to not touch VBA at
all. I really need to work with a C# method later which would
determine the input of the different cells in the range.

I am thinking of somehow doing it using a COM-Add-In, created with
Visual Studio C#/.NET - which can then be installed/referenced into
Excel. But all examples/code in this direction which I have found were
not helpful.

Any ideas in this direction? Or in another direction which does not
involve touching VBA?